code: def keras_initializer_to_dict(initializer):
      try:
          #################### Descendants of `VarianceScaling` ####################
          previous_frame = getattr(initializer, "__hh_previous_frame")
      except AttributeError:
          #################### Non-Descendants of `VarianceScaling` ####################
          class_name = initializer.__class__.__name__
  
          try:
              initializer_params = dict(
                  map(
                      lambda _: (_, getattr(initializer, _)),
                      HH_ARG_ATTRS,
                  )
              )
              if all(not _ for _ in initializer_params.values()):
                  initializer_params = dict()
          except AttributeError:
              initializer_params = parameters_by_signature(initializer)
      else:
          #################### Descendants of `VarianceScaling` (Continued) ####################
          class_name = previous_frame.function
          # TODO: This is very bad, but it'll do for now. FIX IT LATER
          initializer_params = dict(
              seed=getattr(initializer, "__hh_used_kwargs").get(
                  "seed", None
              )
          )
  
      return dict(
          class_name=to_snake_case(class_name), **initializer_params
      )
  
file_path: hyperparameter_hunter/hyperparameter_hunter/compat/keras_helper.py
imports: from hyperparameter_hunter.settings import G
  from hyperparameter_hunter.utils.general_utils import to_snake_case, subdict
  from inspect import signature, _empty
  from types import MethodType
  from typing import List, Tuple
label_desc: Use image node_id 4 for calling a global function with example usage: keras_initializer_to_dict(initializer) and returns: dict