code: def merge_parameter(base_params, override_params):
      """
      Update the parameters in ``base_params`` with ``override_params``.
      Can be useful to override parsed command line arguments.
  
      Parameters
      ----------
      base_params : namespace or dict
          Base parameters. A key-value mapping.
      override_params : dict or None
          Parameters to override. Usually the parameters got from ``get_next_parameters()``.
          When it is none, nothing will happen.
  
      Returns
      -------
      namespace or dict
          The updated ``base_params``. Note that ``base_params`` will be updated inplace. The return value is
          only for convenience.
      """
      if override_params is None:
          return base_params
      is_dict = isinstance(base_params, dict)
      for k, v in override_params.items():
          if is_dict:
              if k not in base_params:
                  raise ValueError(
                      "Key '%s' not found in base parameters." % k
                  )
              v = _ensure_compatible_type(k, base_params[k], v)
              base_params[k] = v
          else:
              if not hasattr(base_params, k):
                  raise ValueError(
                      "Key '%s' not found in base parameters." % k
                  )
              v = _ensure_compatible_type(k, getattr(base_params, k), v)
              setattr(base_params, k, v)
      return base_params
  
imports: import copy
  from enum import Enum, unique
  from pathlib import Path
  from schema import And
  from .None import parameter_expressions
label_desc: Use image node_id 7 for calling a global function with example usage: merge_parameter(base_params, override_params) and returns: base_params, base_params