def verify_utctz(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
dataset/ETHPy150Open gitpython-developers/GitPython/git/objects/util.py/verify_utctz