docs: def convert_surfaces(self, surface_nodes):
          """
          Utility to convert a list of surface nodes into a single hazardlib
          surface. There are four possibilities:
  
          1. there is a single simpleFaultGeometry node; returns a
             :class:`openquake.hazardlib.geo.simpleFaultSurface` instance
          2. there is a single complexFaultGeometry node; returns a
             :class:`openquake.hazardlib.geo.complexFaultSurface` instance
          3. there is a single griddedSurface node; returns a
             :class:`openquake.hazardlib.geo.GriddedSurface` instance
          4. there is a list of PlanarSurface nodes; returns a
             :class:`openquake.hazardlib.geo.MultiSurface` instance
  
          :param surface_nodes: surface nodes as just described
          """
          surface_node = surface_nodes[0]
          if surface_node.tag.endswith('simpleFaultGeometry'):
              surface = geo.SimpleFaultSurface.from_fault_data(
                  self.geo_line(surface_node),
                  ~surface_node.upperSeismoDepth,
                  ~surface_node.lowerSeismoDepth,
                  ~surface_node.dip,
                  self.rupture_mesh_spacing)
          elif surface_node.tag.endswith('complexFaultGeometry'):
              surface = geo.ComplexFaultSurface.from_fault_data(
                  self.geo_lines(surface_node),
                  self.complex_fault_mesh_spacing)
          elif surface_node.tag.endswith('griddedSurface'):
              with context(self.fname, surface_node):
                  coords = split_coords_3d(~surface_node.posList)
              points = [geo.Point(*p) for p in coords]
              surface = geo.GriddedSurface.from_points_list(points)
          else:  # a collection of planar surfaces
              planar_surfaces = list(map(self.geo_planar, surface_nodes))
              surface = geo.MultiSurface(planar_surfaces)
          return surface