code: def auto_stratify(scores, **kwargs):
      
      if 'stratification_method' in kwargs:
          method = kwargs['stratification_method']
      else:
          method = 'cum_sqrt_F'
      if 'stratification_n_strata' in kwargs:
          n_strata = kwargs['stratification_n_strata']
      else:
          n_strata = 'auto'
      if 'stratification_n_bins' in kwargs:
          n_bins = kwargs['stratification_n_bins']
          strata = stratify_by_scores(scores, n_strata, method = method, \
                                           n_bins = n_bins)
      else:
          strata = stratify_by_scores(scores, n_strata, method = method)
      return strata
docs: Generate Strata instance automatically
  
      Parameters
      ----------
      scores : array-like, shape=(n_items,)
          ordered array of scores which quantify the classifier confidence for
          the items in the pool. High scores indicate a high confidence that
          the true label is a "1" (and vice versa for label "0").
  
      **kwargs :
          optional keyword arguments. May include 'stratification_method',
          'stratification_n_strata', 'stratification_n_bins'.
  
      Returns
      -------
      Strata instance