code: def extra_enter_attrs(
      iter_attrs: Union[BooleanEnterFunc, List[BooleanEnterFunc]]
  ) -> EnterFunc:
      """Build an `enter` function intended for use with `boltons_utils.remap` that enables entrance
      into non-standard objects defined by `iter_attrs` and iteration over their attributes as dicts
  
      Parameters
      ----------
      iter_attrs: Callable, list of callables, or None
          If callable, must evaluate to True or False when given three inputs: (path, key, value).
          Callable should return True if the current value should be entered by `remap`. If callable
          returns False, `default_enter` will be called. If `iter_attrs` is a list of callables, the
          value will be entered if any evaluates to True. If None, `default_enter` will be called
  
      Returns
      -------
      _enter: Callable
          Function to enter non-standard objects according to `iter_attrs` (via `remap`)
      """
      iter_attrs = iter_attrs or [lambda *_args: False]
      iter_attrs = (
          [iter_attrs]
          if not isinstance(iter_attrs, list)
          else iter_attrs
      )
  
      def _enter(path, key, value):
          """If any in `iter_attrs` is True, enter `value` as a dict, iterating over non-magic
          attributes. Else, `default_enter`"""
          if any([_(path, key, value) for _ in iter_attrs]):
              included_attrs = [
                  _ for _ in dir(value) if not _.endswith("__")
              ]  # type: List[str]
              # Skips "dunder" methods, but keeps "__hh" attributes
              included_attrs = sorted(included_attrs, reverse=True)
              # Reverse to put public attributes before private - Without reversal, `remap` ignores
              #   `FeatureEngineer.steps` property because the identical `_steps` was already visited
              return dict(), [
                  (_, getattr(value, _)) for _ in included_attrs
              ]
          # TODO: Find better way to avoid entering "__hh_previous_frame" to avoid Traceback added by `tracers.LocationTracer`
          if isinstance(value, Traceback):
              return dict(), []
          # TODO: Find better way to avoid entering "__hh_previous_frame" to avoid Traceback added by `tracers.LocationTracer`
  
          return default_enter(path, key, value)
  
      return _enter
  
imports: from hyperparameter_hunter.utils.boltons_utils import remap, default_enter
  from datetime import datetime
  from inspect import Traceback
  import re
  import string
  from typing import Any, Callable, Iterable, List, Tuple, Union
  import wrapt
label_desc: Use image node_id 2 for calling a global function with example usage: extra_enter_attrs(iter_attrs) and returns: _enter, default_enter, dict,  unknown, dict,  list