code: def _name_estimators(estimators):
      
  
      def get_name(estimator):
          if isinstance(estimator, DelegatingRobustTransformer):
              return get_name(estimator._transformer)
  
          return type(estimator).__name__.lower()
  
      names = list(map(get_name, estimators))
      counter = dict(Counter(names))
      counter = select_values(lambda x: x > 1, counter)
  
      for i in reversed(range(len(estimators))):
          name = names[i]
          if name in counter:
              names[i] += "-%d" % counter[name]
              counter[name] -= 1
  
      return list(zip(names, estimators))
docs: Generate names for estimators.
  
      Adapted from sklearn.pipeline._name_estimators