def indent(text, prefix, predicate=None):
    if predicate is None:
        def predicate(line):
            return line.strip()

    def prefixed_lines():
        for line in text.splitlines(True):
            yield (prefix + line if predicate(line) else line)
    return ''.join(prefixed_lines())
Derived classes can implement extra functionality here
dataset/ETHPy150Open amrdraz/kodr/app/brython/www/src/Lib/textwrap.py/indent--crossover with--dataset/ETHPy150Open pybrain/pybrain/pybrain/rl/environments/ode/environment.py/ODEEnvironment.specialfunctionDoc