def verify_utctz(offset: str) -> str:
    """
    :raise ValueError:
        If `offset` is incorrect.

    :return:
        `offset`
    """
    fmt_exc = ValueError("Invalid timezone offset format: %s" % offset)
    if len(offset) != 5:
        raise fmt_exc
    if offset[0] not in "+-":
        raise fmt_exc
    if offset[1] not in digits or offset[2] not in digits or offset[3] not in digits or offset[4] not in digits:
        raise fmt_exc
    # END for each char
    return offset

    :raise ValueError:
        If `offset` is incorrect.

    :return:
        `offset`
    
git/objects/util.py