def indent(txt, indent_level):
    """
    Indent a piece of text
    >>> indent('foo', 2)
    '    foo'
    """
    indent = "  " * indent_level
    return "\n".join(indent + x for x in txt.splitlines())