def parse_iso_time(value: str) -> time:
    if (not ISO_8601_TIME_REGEX.match(value)):
        raise ValueError(f'Passed value {value} is not valid ISO-8601 time.')
    time_parts = ISO_8601_TIME_REGEX.fullmatch(value)
    hour_parts = time_parts.group('time')
    if (':' in hour_parts):
        hour_parts = hour_parts.split(':')
    else:
        hour_parts = list(map(''.join, zip(*([iter(hour_parts)] * 2))))
    microseconds = time_parts.group('microseconds')
    if (microseconds is not None):
        microseconds = int(microseconds[1:])
    else:
        microseconds = 0
    tz_part = time_parts.group('tzpart')
    if (tz_part and (tz_part.lower() != 'z')):
        sign = (1 if (tz_part[0] == '+') else (- 1))
        (hours, minutes) = tz_part[1:].split(':')
        offset = timezone(timedelta(hours=(int(hours) * sign), minutes=(int(minutes) * sign)))
    elif (tz_part and (tz_part.lower() == 'z')):
        offset = timezone.utc
    else:
        offset = None
    return time(hour=int(hour_parts[0]), minute=int(hour_parts[1]), second=int(hour_parts[2]), microsecond=microseconds, tzinfo=offset)
def parse_iso_time(value: str) -> time:
    if (not ISO_8601_TIME_REGEX.match(value)):
        raise ValueError(f'Passed value {value} is not valid ISO-8601 time.')
    time_parts = ISO_8601_TIME_REGEX.fullmatch(value)
    hour_parts = time_parts.group('time')
    if (':' in hour_parts):
        hour_parts = hour_parts.split(':')
    else:
        hour_parts = list(map(.join, zip(*([iter(hour_parts)] * 2))))
    microseconds = time_parts.group('microseconds')
    if (microseconds is not None):
        microseconds = int(microseconds[1:])
    else:
        microseconds = 0
    tz_part = time_parts.group('tzpart')
    if (tz_part and (tz_part.lower() != 'z')):
        sign = (1 if (tz_part[0] == '+') else (- 1))
        (hours, minutes) = tz_part[1:].split(':')
        offset = timezone(timedelta(hours=(int(hours) * sign), minutes=(int(minutes) * sign)))
    elif (tz_part and (tz_part.lower() == 'z')):
        offset = timezone.utc
    else:
        offset = None
    return time(hour=int(hour_parts[0]), minute=int(hour_parts[1]), second=int(hour_parts[2]), microsecond=microseconds, tzinfo=offset)