def verify_utctz(offset):
    """: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
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 return offset
:raise ValueError: if offset is incorrect
    :return: offset