<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_atlas_zonefile_data( zonefile_hash, zonefile_dir, check=True ):
 """ Get a serialized cached zonefile from local disk Return None if not found """

    zonefile_path = atlas_zonefile_path(zonefile_dir, zonefile_hash)
    zonefile_path_legacy = atlas_zonefile_path_legacy(zonefile_dir, zonefile_hash)

    for zfp in [zonefile_path, zonefile_path_legacy]:

        if not os.path.exists( zfp ):
            continue

        if check:
            res = _read_atlas_zonefile(zfp, zonefile_hash)
        else:
            res = _read_atlas_zonefile(zfp, None)

        if res:
            return res

    return None