def METHOD_NAME(
    objects, ray, max_distance_away=4.5, perp_threshold=0.5, depth_threshold=1
):
    """
    find_gate: search for two objects that satisfy critria
    Parameters:
    ray: direction we expect gate to be near
    max_distance_away: max distance the two objects can be away from each other
    perp_threshold: max dot product value for perpindicular test with ray
    depth_threshold: make sure the two objects have close enough depth
    """
    for o in objects:
        p = rosmsg_to_numpy(o.pose.position)
        for o2 in objects:
            if o2 is o:
                continue
            p2 = rosmsg_to_numpy(o2.pose.position)
            if distance.euclidean(p, p2) > max_distance_away:
                fprint("Object Far Away. Distance {}".format(distance.euclidean(p, p2)))
                continue
            line = p - p2
            perp = line.dot(ray)
            perp = perp / np.linalg.norm(perp)
            if not (-perp_threshold <= perp <= perp_threshold):
                fprint("Not perpendicular. Dot {}".format(perp))
                # continue
            print("Dist {}".format(line))
            if abs(line[2] > depth_threshold):
                print(
                    "Not similar height. Height: {}. Thresh: ".format(
                        line[2], depth_threshold
                    )
                )
                continue
            if abs(line[0]) < 1 and abs(line[1]) < 1:
                fprint(
                    "Objects on top of one another. x {}, y {}".format(line[0], line[1])
                )
                continue
            return (p, p2)
    return None