def indent_multiline(s: str, indentation: str = "  ", add_newlines: bool = True) -> str:
    """Indent the given string if it contains more than one line.

    Args:
        s: String to indent
        indentation: Indentation to prepend to each line.
        add_newlines: Whether to add newlines surrounding the result
            if indentation was added.
    """
    lines = s.splitlines()
    if len(lines) <= 1:
        return s

    lines_str = "\n".join(f"{indentation}{line}" for line in lines)
    if add_newlines:
        return f"\n{lines_str}\n"
    else:
        return lines_str