docs: def get_middle_point(self):
          """
          If :class:`MultiSurface` is defined by a single surface, simply
          returns surface's middle point, otherwise find surface element closest
          to the surface's bounding box centroid and return corresponding
          middle point.
  
          Note that the concept of middle point for a multi surface is ambiguous
          and alternative definitions may be possible. However, this method is
          mostly used to define the hypocenter location for ruptures described
          by a multi surface
          (see :meth:`openquake.hazardlib.source.characteristic.CharacteristicFaultSource.iter_ruptures`).
          This is needed because when creating fault based sources, the rupture's
          hypocenter locations are not explicitly defined, and therefore an
          automated way to define them is required.
          """
          if len(self.surfaces) == 1:
              return self.surfaces[0].get_middle_point()
  
          west, east, north, south = self.get_bounding_box()
          longitude, latitude = utils.get_middle_point(west, north, east, south)
  
          dists = []
          for surf in self.surfaces:
              dists.append(
                  surf.get_min_distance(Mesh(numpy.array([longitude]),
                                             numpy.array([latitude]),
                                             None)))
          dists = numpy.array(dists).flatten()
          idx = dists == numpy.min(dists)
          return numpy.array(self.surfaces)[idx][0].get_middle_point()