def METHOD_NAME(hash_id, coor, bits, inter_arc_dist):
    """Compute the hashes of all neighboring cells in a 3x3x3 neighborhood."""
    lat_sign = hash_id & 0x1
    i_depth = (hash_id >> 1) & ((1 << bits[0])-1)
    i_lat = (hash_id >> (1+bits[0])) & ((1 << bits[1])-1)
    def all_neigh_depth(i_lat, i_lon, lat_sign):
        hashes = []
        for d_depth in [-1, 0, 1]:
            new_depth = i_depth + d_depth
            if new_depth < 0:
                continue
            hashes.append(
                i_3d_to_hash(new_depth, i_lat, i_lon, lat_sign, bits))
        return hashes
    neighbors = []
    # Loop over lower row, middle row, upper row
    for i_d_lat in [-1, 0, 1]:
        new_lat_sign = lat_sign
        new_i_lat = i_lat + i_d_lat
        if new_i_lat == -1:
            new_i_lat = 0
            new_lat_sign = (1-lat_sign)
        min_lat = new_i_lat + 1
        circ_small = 2*np.pi*np.cos(min_lat*inter_arc_dist)
        n_new_lon = int(max(1, np.floor(circ_small/inter_arc_dist)))
        d_lon = 360/n_new_lon
        if n_new_lon <= 3:
            for new_i_lon in range(n_new_lon):
                neighbors.extend(
                    all_neigh_depth(new_i_lat, new_i_lon, new_lat_sign))
        else:
            start_i_lon = int(np.floor(coor[2]/d_lon))
            for delta_lon in [-1, 0, 1]:
                new_i_lon = (start_i_lon+delta_lon+n_new_lon) % n_new_lon
                neighbors.extend(
                    all_neigh_depth(new_i_lat, new_i_lon, new_lat_sign))
    return neighbors