def METHOD_NAME(mesh: Mesh, dim: int, entities: npt.NDArray[np.int32]) -> BoundingBoxTree:
    """Create a bounding box tree for the midpoints of a subset of entities.
    Args:
        mesh: The mesh.
        dim: Topological dimension of the entities.
        entities: Indices of mesh entities to include.
    Returns:
        Bounding box tree for midpoints of cell entities.
    """
    return BoundingBoxTree(_cpp.geometry.METHOD_NAME(mesh._cpp_object, dim, entities))