class_docstr: Handles parameter management for classifiers composed of named steps.
      
code: def _replace_step(self, steps_attr, name, new_val):
      # assumes `name` is a valid step name
      new_steps = getattr(self, steps_attr)[:]
      for i, (step_name, _) in enumerate(new_steps):
          if step_name == name:
              new_steps[i] = (name, new_val)
              break
      setattr(self, steps_attr, new_steps)
  
imports: from collections import defaultdict
  from warnings import warn
  from abc import ABCMeta, abstractmethod
  import numpy
  from scipy import sparse
  from .base import BaseEstimator, TransformerMixin
  from .externals.joblib import Parallel, delayed
  from .externals import six
  from .utils import tosequence
  from .utils.metaestimators import if_delegate_has_method
label_desc: Use image node_id 2 for calling the _BasePipeline obj's underlying member method code with example usage: obj._replace_step(steps_attr, name, new_val) without return types