def compute_centroid(objects):
    """Compute the centroid of the provided objects."""
    total_coords = np.zeros(2)
    for obj in objects:
        total_coords += np.array([obj.location.x, obj.location.y])
    return total_coords / len(objects)
Compute the centroid of the provided objects.
infinigen/core/constraints/evaluator/node_impl/symmetry.py