def prepend_indent(string, indent_level):
    """
    Add a given indent before every line of the string

    :string: string to which we want to append the indent
    :indent_level: integer number of spaces to prepend
    """
    indented = "".join("{}{}\n".format(" "*indent_level, line) for line in string.splitlines())
    return indented