def indent(text, indent):
    """Indent a text (or list of lines) with the given indent string."""
    if isinstance(text, list) or isinstance(text, set):
        return indent + ("\n" + indent).join(text)
    else:
        return indent + text.replace("\n", "\n" + indent)