code: def numpy_type_to_python_type(value: Any) -> Any:
      """If `value` is a Numpy int or float, coerce to a Python int or float.
      This is necessary because some of our transforms return Numpy values.
      """
      if isinstance(value, np.integer):
          value = int(
              value
          )  # pragma: nocover (covered by generator tests)
      if isinstance(value, np.floating):
          value = float(
              value
          )  # pragma: nocover  (covered by generator tests)
      return value
  
file_path: Ax/ax/utils/common/typeutils.py
imports: from inspect import signature
  from typing import Any, Dict, List, Optional, Tuple, Type, TypeVar
  import numpy
  from typeguard import check_type
label_desc: Use image node_id 8 for calling a global function with example usage: numpy_type_to_python_type(value) and returns: value