def hydrate_time(nanoseconds, tz=None):
seconds, nanoseconds = map(int, divmod(nanoseconds, <NUM_LIT>))<EOL>minutes, seconds = map(int, divmod(seconds, <NUM_LIT>))<EOL>hours, minutes = map(int, divmod(minutes, <NUM_LIT>))<EOL>seconds = (<NUM_LIT> * seconds + nanoseconds) / <NUM_LIT><EOL>t = Time(hours, minutes, seconds)<EOL>if tz is None:<EOL><INDENT>return t<EOL><DEDENT>tz_offset_minutes, tz_offset_seconds = divmod(tz, <NUM_LIT>)<EOL>zone = FixedOffset(tz_offset_minutes)<EOL>return zone.localize(t)<EOL>
Hydrator for `Time` and `LocalTime` values.

    :param nanoseconds:
    :param tz:
    :return: Time