def get_wiki_lines(wt, predicate=None):
    """get_wiki_lines.
    Splits a WikiText object into a list of lines.

    :param wt: WikiText object
    :param predicate: Boolean function applied as a filter to the returned lines
    """
    return [line for line in wt.contents.split('\n') if not callable(predicate) or predicate(line)]