code: def _substitute_default(s, new_value):
      """Replaces the default value in a parameter docstring by a new value.
  
      The docstring must conform to the numpydoc style and have the form
      "something (keyname=<value-to-replace>)"
  
      If no matching pattern is found or ``new_value`` is None, return
      the input untouched.
  
      Examples
      --------
      >>> _replace_default('int (default=128)', 256)
      'int (default=256)'
      >>> _replace_default('nonlin (default = ReLU())', nn.Hardtanh(1, 2))
      'nonlin (default = Hardtanh(min_val=1, max_val=2))'
  
      """
      if new_value is None:
          return s
  
      # BB: ideally, I would like to replace the 'default*' group
      # directly but I haven't found a way to do this
      i, j = _get_span(s, pattern=P_DEFAULTS)
      if (i, j) == (-1, -1):
          return s
      return "{}{}{}".format(s[:i], new_value, s[j:])
  
imports: from functools import partial
  from importlib import import_module
  from itertools import chain
  import re
  import shlex
  import sys
  from sklearn.base import BaseEstimator
  from sklearn.pipeline import FeatureUnion
  from sklearn.pipeline import Pipeline
label_desc: Use image node_id 3 for calling a global function with example usage: _substitute_default(s, new_value) and returns: str, s, s