code: def _collect_parameters(func):
      """The decorator function is to collect all the params passed into an invoked function of class.
  
      These parameters are set as properties of the class instance. The use case is to simplify
      parameter collecting when they are passed into the step __init__ method.
  
      Usage:
          class A:
              @collect_parameters
              def __init__(a, b='', c=None)
                  pass
  
          In above case, the A instance would have a, b, c set as instance properties.
          None value will be set as well. If the property exists, it will be overridden.
      """
  
      @wraps(func)
      def wrapper(self, *args, **kwargs):
          # Get the parameters and values
          signature = inspect.signature(func)
          bound_args = signature.bind(self, *args, **kwargs)
          bound_args.apply_defaults()
  
          # Create a dictionary of parameters and their values
          parameters_and_values = dict(bound_args.arguments)
  
          for param, value in parameters_and_values.items():
              if param not in ("self", "depends_on"):
                  setattr(self, param, value)
  
          func(self, *args, **kwargs)
  
      return wrapper
  
imports: from __future__ import absolute_import
  import inspect
  import logging
  from functools import wraps
  from pathlib import Path
  from typing import List, Sequence, Union, Set, TYPE_CHECKING, Optional
  import hashlib
  from urllib.parse import unquote, urlparse
  from contextlib import contextmanager
  from _hashlib import HASH
  from sagemaker.utils import base_from_name
  from sagemaker.workflow.parameters import Parameter
  from sagemaker.workflow.pipeline_context import _StepArguments, _PipelineConfig
  from sagemaker.workflow.entities import Entity, RequestType
  from sagemaker.workflow.pipeline_definition_config import PipelineDefinitionConfig
label_desc: Use image node_id 19 for calling a global function with example usage: _collect_parameters(func) and returns: wrapper