docs: def _get_fault_rates(self, source, mmin, mmax=np.inf):
          """
          Adds the rates for a simple or complex fault source
  
          :param source:
              Fault source as instance of :class:
              openquake.hazardlib.source.simple_fault.SimpleFaultSource or
              openquake.hazardlib.source.complex_fault.ComplexFaultSource
          """
          for rup in list(source.iter_ruptures()):
              if (rup.mag < mmin) or (rup.mag > mmax):
                  # Magnitude outside search range
                  continue
              depths = rup.surface.mesh.depths.flatten()
              # Generate simple mesh from surface
              rupt_mesh = Mesh(rup.surface.mesh.lons.flatten(),
                               rup.surface.mesh.lats.flatten(),
                               depths)
              # Mesh points in polygon
              in_poly = self.limits.intersects(rupt_mesh)
              in_depth = np.logical_and(depths >= self.upper_depth,
                                        depths <= self.lower_depth)
              idx = np.logical_and(in_poly, in_depth)
              if np.any(idx):
                  node_rate = rup.occurrence_rate / float(len(depths))
                  self.rates += (node_rate * np.sum(idx))