code: def _get_params(step, changed_only):
      params = (
          step.get_params(deep=False)
          if hasattr(step, "get_params")
          else {}
      )
      if changed_only and params:
          init_func = step._get_super_class_with_init().__init__
          init_params = {
              name: param.default
              for name, param in signature(init_func).parameters.items()
          }
          params = _changed_params(params, init_params)
  
      params = OrderedDict(
          (name, val)
          for (name, val) in sorted(
              params.items(), key=pprint._safe_tuple
          )
      )
      # step-specific parameters
      params.update(
          {
              "name": step.name,
          }
      )
      params.update({"n_outputs": step.n_outputs})
      return params
  
imports: from inspect import signature
  import numbers
  import pprint
  import re
  from collections import OrderedDict
  import numpy
  from baikal import Step, get_config
label_desc: Use image node_id 2 for calling a global function with example usage: _get_params(step, changed_only) and returns: params