code: def _to_numpy_type(dtype):
      """Converts a native python or TF DType to numpy type.
  
      Args:
        dtype: Could be a python type, a numpy type or a TF DType.
  
      Returns:
        A NumPy `dtype`.
      """
      if isinstance(dtype, tf.DType):
          return dtype.as_numpy_dtype
      return np.dtype(dtype)
  
imports: import funcsigs
  import numpy
  import tensorflow.compat.v2
  from trax.tf_numpy.numpy_impl import arrays
  from trax.tf_numpy.numpy_impl import dtypes
label_desc: Use image node_id 4 for calling a global function with example usage: _to_numpy_type(dtype) and returns: np, dtype