def indent(string, prefix='    '):
    """Replicate python3's textwrap.indent for python2.

    Parameters
    ----------
    string : str
        Any string.
    prefix : str
        What to indent with.

    Returns
    -------
    str
        Indented string
    """
    out = ''
    for i in string.split('\n'):
        out += '{}{}\n'.format(prefix, i)
    return out
