code: def _name_estimators(estimators):
      """Generate names for estimators."""
  
      names = [
          estimator
          if isinstance(estimator, str)
          else type(estimator).__name__.lower()
          for estimator in estimators
      ]
      namecount = defaultdict(int)
      for est, name in zip(estimators, names):
          namecount[name] += 1
  
      for k, v in list(namecount.items()):
          if v == 1:
              del namecount[k]
  
      for i in reversed(range(len(estimators))):
          name = names[i]
          if name in namecount:
              names[i] += "-%d" % namecount[name]
              namecount[name] -= 1
  
      return list(zip(names, estimators))
  
imports: from ..preprocessing import FunctionTransformer
  from ....thirdparty_adapters import check_array
  from ..utils.validation import check_is_fitted
  from ..utils.skl_dependencies import TransformerMixin, BaseComposition, BaseEstimator
  from cuml.internals import _deprecate_pos_args
  from cuml.internals.array_sparse import SparseCumlArray
  from cuml.internals.global_settings import _global_settings_data
  import cuml
  from itertools import chain
  from itertools import compress
  from joblib import Parallel
  import functools
  import timeit
  import numbers
  from cuml.internals.import_utils import has_sklearn
  from contextlib import contextmanager
  from collections import defaultdict
  import warnings
  from cuml.internals.safe_imports import cpu_only_import_from
  from cuml.internals.safe_imports import gpu_only_import_from
  from cuml.internals.safe_imports import cpu_only_import
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 10 for calling a global function with example usage: _name_estimators(estimators) and returns: list