code: def reduction_ratio(links_pred, *total):
      
  
      n_max = full_index_size(*total)
  
      if isinstance(links_pred, pandas.MultiIndex):
          links_pred = len(links_pred)
  
      if links_pred > n_max:
          raise ValueError("n has to be smaller of equal n_max")
  
      return 1 - links_pred / n_max
docs: Compute the reduction ratio.
  
      The reduction ratio is 1 minus the ratio candidate matches and the maximum
      number of pairs possible.
  
      Parameters
      ----------
      links_pred: int, pandas.MultiIndex
          The number of candidate record pairs or the pandas.MultiIndex with
          record pairs.
      *total: pandas.DataFrame object(s)
          The DataFrames are used to compute the full index size with the
          full_index_size function.
  
      Returns
      -------
      float
          The reduction ratio.