def METHOD_NAME(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