code: def _sort_dd_skips(configs, dd_indices_all):
      
      config_current_skips = np.abs(configs[:, 1] - configs[:, 0])
      if np.all(np.isnan(config_current_skips)):
          return {0: []}
  
      # determine skips
      available_skips_raw = np.unique(config_current_skips)
      available_skips = available_skips_raw[
          ~np.isnan(available_skips_raw)
      ].astype(int)
  
      # now determine the configurations
      dd_configs_sorted = {}
      for skip in available_skips:
          indices = np.where(config_current_skips == skip)[0]
          dd_configs_sorted[skip - 1] = dd_indices_all[indices]
  
      return dd_configs_sorted
docs: Given a set of dipole-dipole configurations, sort them according to
      their current skip.
  
      Parameters
      ----------
      configs: Nx4 numpy.ndarray
          Dipole-Dipole configurations
  
      Returns
      -------
      dd_configs_sorted: dict
          dictionary with the skip as keys, and arrays/lists with indices to
          these skips.