def METHOD_NAME(n, text):
    r"""
    Indent each line in text by ``n`` spaces.
    INPUT:
    - ``n`` -- indentation amount
    - ``text`` -- text to indent
    EXAMPLES::
        sage: from sage_setup.autogen.interpreters import indent_lines
        sage: indent_lines(3, "foo")
        '   foo'
        sage: indent_lines(3, "foo\nbar")
        '   foo\n   bar'
        sage: indent_lines(3, "foo\nbar\n")
        '   foo\n   bar\n'
    """
    lines = text.splitlines(True)
    spaces = ' ' * n
    return ''.join((spaces if line.strip() else '') + line
                   for line in lines)