docs: def get_set_num_ruptures(src):
      """
      Extract the number of ruptures and set it
      """
      if not src.num_ruptures:
          t0 = time.time()
          src.num_ruptures = src.count_ruptures()
          dt = time.time() - t0
          clsname = src.__class__.__name__
          if dt > 10:
              if 'Area' in clsname:
                  logging.warning(
                      '%s.count_ruptures took %d seconds, perhaps the '
                      'area discretization is too small', src, dt)
              elif 'ComplexFault' in clsname:
                  logging.warning(
                      '%s.count_ruptures took %d seconds, perhaps the '
                      'complex_fault_mesh_spacing is too small', src, dt)
              elif 'SimpleFault' in clsname:
                  logging.warning(
                      '%s.count_ruptures took %d seconds, perhaps the '
                      'rupture_mesh_spacing is too small', src, dt)
              else:
                  # multiPointSource
                  logging.warning('count_ruptures %s took %d seconds', src, dt)
      return src.num_ruptures