class_docstr: Handles parameter management for classifiers composed of named estimators.
code: def _get_params(self, attr, deep=True):
      out = super().get_params(deep=deep)
      if not deep:
          return out
  
      estimators = getattr(self, attr)
      try:
          out.update(estimators)
      except (TypeError, ValueError):
          # Ignore TypeError for cases where estimators is not a list of
          # (name, estimator) and ignore ValueError when the list is not
          # formatted correctly. This is to prevent errors when calling
          # `set_params`. `BaseEstimator.set_params` calls `get_params` which
          # can error for invalid values for `estimators`.
          return out
  
      for name, estimator in estimators:
          if hasattr(estimator, "get_params"):
              for key, value in estimator.get_params(deep=True).items():
                  out["%s__%s" % (name, key)] = value
      return out
  
file_path: catboost/contrib/python/scikit-learn/py3/sklearn/utils/metaestimators.py
imports: from abc import ABCMeta, abstractmethod
  from contextlib import suppress
  from typing import Any, List
  import numpy
  from ..base import BaseEstimator
  from ..utils import _safe_indexing
  from ..utils._tags import _safe_tags
  from ._available_if import available_if
label_desc: Use image node_id 2 for calling the _BaseComposition obj's underlying member method code with example usage: obj._get_params(attr, deep) and returns: out, out, out