def METHOD_NAME(obj: Any, indent: int = 0, tag: str = None, width: int = 120) -> str:
    """
    Pretty print any Python object to a string.
    """
    if not isinstance(obj, str):
        result = pprint.pformat(obj, indent=indent, width=width)
    elif "\n" not in obj:
        result = repr(obj)
    else:
        # Return the enumerated lines of the string.
        lines = "".join([f"  {i:4}: {z!r}\n" for i, z in enumerate(split_lines(obj))])
        result = f"[\n{lines}]\n"
    return f"{tag.strip()}: {result}" if tag and tag.strip() else result