def _changed_group_format(left: str, right: str) -> str:
    """Get a ``--changed-group-format`` diff(1) option.

    Style mimics diff3(1) output.
    """
    newline = r"%c'\012'"
    return (
        f"<<<<<<< {left}{newline}"
        + "%<"  # lines from left
        + f"======={newline}"
        + "%>"  # lines from right
        + f">>>>>>> {right}{newline}"
    )