code: def _default_numeric_type_factory(
      valid_types: Mapping[str, type], enum_key: _Value, type_name: str
  ) -> type:
      value: Union[str, type] = _default(enum_key)
      if isinstance(value, type) and (value in valid_types.values()):
          return value
      assert isinstance(value, str)  # Hint for mypy
      if value not in valid_types:
          raise TypeError(f"Config cannot recognize {type_name} type.")
      return valid_types[value]
  
imports: import contextlib
  import os
  from dataclasses import dataclass, field, replace
  from typing import Any, Dict, Generator, List, Mapping, Optional, Union
  import numpy
  import tabulate
  import tensorflow
  import tensorflow_probability
label_desc: Use image node_id 2 for calling a global function with example usage: _default_numeric_type_factory(valid_types, enum_key, type_name) and returns: valid_types, value