code: def update_match_status(target_attr="match_status") -> callable:
      """Build a decorator to apply to class instance methods to record inputs/outputs
  
      Parameters
      ----------
      target_attr: String, default="match_status"
          Name of dict attribute in the class instance of the decorated method, in which the decorated
          method's inputs and outputs should be recorded. This attribute should be predefined and
          documented by the class whose method is being decorated
  
      Returns
      -------
      Callable
          Decorator that will save the decorated method's inputs and outputs to the attribute dict
          named by `target_attr`. Decorator assumes that the method will receive at least three
          positional arguments: "exp_id", "params", and "score". "exp_id" is used as the key added to
          `target_attr`, with a dict value, which includes the latter two positional arguments. Each
          time the decorator is invoked with an "exp_id", an additional key is added to its dict that
          is the name of the decorated method, and whose value is the decorated method's output
  
      See Also
      --------
      :class:`ResultFinder`
          Decorates "does_match..." methods using `update_match_status` in order to keep a detailed
          record of the full pool of candidate Experiments in :attr:`ResultFinder.match_status`
  
      Examples
      --------
      >>> class X:
      ...     def __init__(self):
      ...         self.match_status = dict()
      ...     @update_match_status()
      ...     def method_a(self, exp_id, params, score):
      ...         return True
      ...     @update_match_status()
      ...     def method_b(self, exp_id, params, score):
      ...         return False
      >>> x = X()
      >>> x.match_status
      {}
      >>> assert x.method_a("foo", None, 0.8) is True
      >>> x.match_status  # doctest: +NORMALIZE_WHITESPACE
      {'foo': {'params': None,
               'score': 0.8,
               'method_a': True}}
      >>> assert x.method_b("foo", None, 0.8) is False
      >>> x.match_status  # doctest: +NORMALIZE_WHITESPACE
      {'foo': {'params': None,
               'score': 0.8,
               'method_a': True,
               'method_b': False}}
      >>> assert x.method_b("bar", "some stuff", 0.5) is False
      >>> x.match_status  # doctest: +NORMALIZE_WHITESPACE
      {'foo': {'params': None,
               'score': 0.8,
               'method_a': True,
               'method_b': False},
       'bar': {'params': 'some stuff',
               'score': 0.5,
               'method_b': False}}
      """
  
      @wrapt.decorator
      def wrapper(wrapped, instance, args, kwargs):
          result = wrapped(*args, **kwargs)
  
          getattr(instance, target_attr).setdefault(
              args[0], dict(params=args[1], score=args[2])
          )[wrapped.__name__] = result
  
          return result
  
      return wrapper
  
imports: from hyperparameter_hunter.feature_engineering import EngineerStep, FeatureEngineer
  from hyperparameter_hunter.i_o.exceptions import IncompatibleCandidateError
  from hyperparameter_hunter.compat.keras_helper import keras_callback_to_dict, keras_initializer_to_dict
  from hyperparameter_hunter.settings import G
  from hyperparameter_hunter.space.dimensions import Categorical, RejectedOptional
  from hyperparameter_hunter.space.space_core import Space
  from hyperparameter_hunter.utils.boltons_utils import remap, get_path
  from hyperparameter_hunter.utils.general_utils import multi_visit
  from hyperparameter_hunter.utils.optimization_utils import does_fit_in_space, get_ids_by, get_scored_params
  from copy import deepcopy
  from numbers import Number
  from pathlib import Path
  from typing import Dict, List, Tuple, Union
  import wrapt
label_desc: Use image node_id 2 for calling a global function with example usage: update_match_status(target_attr) and returns: wrapper, result