Indent some text.

    Note that this is present as ``textwrap.indent``, but not in Python 2.

    Args:
        lines (str): The newline delimited string to be indented.
        prefix (Optional[str]): The prefix to indent each line with. Default
            to two spaces.

    Returns:
        str: The newly indented content.

def _indent(lines, prefix="  "):
    """Indent some text.

    Note that this is present as ``textwrap.indent``, but not in Python 2.

    Args:
        lines (str): The newline delimited string to be indented.
        prefix (Optional[str]): The prefix to indent each line with. Default
            to two spaces.

    Returns:
        str: The newly indented content.
    """
    indented = []
    for line in lines.split("\n"):
        indented.append(prefix + line)
    return "\n".join(indented)