<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_timezones():
 """ Get the supported timezones. The list will be cached unless you set the "fresh" attribute to True. :param fresh: Whether to get a fresh list or not :type fresh: bool :rtype: tuple """

    base_dir = _DIRECTORY
    zones = ()

    for root, dirs, files in os.walk(base_dir):
        for basename in files:
            zone = os.path.join(root, basename)
            if os.path.isdir(zone):
                continue

            zone = os.path.relpath(zone, base_dir)

            with open(os.path.join(root, basename), 'rb') as fd:
                if fd.read(4) == b'TZif' and zone not in INVALID_ZONES:
                    zones = zones + (zone,)

    return tuple(sorted(zones))