Should the `distance_matrix` parameter be a `bipy.core.distance.DistanceMatrix` object?