code: def get_numpy_dtype_info(dtype) -> Union[np.finfo, np.iinfo]:
      """
      Return an appropriate 'np.iinfo' or 'np.finfo' object corresponding to
      the specified Numpy dtype.
  
      'dtype' must be a value that 'numpy.dtype(...)' can handle.
      """
      np_dtype = np.dtype(dtype)
      kind = np_dtype.kind
  
      if kind == "f":
          return np.finfo(np_dtype)
      elif kind == "i":
          return np.iinfo(np_dtype)
      else:
          raise TypeError(
              f"dtype ({dtype}) must indicate some floating-point or integral data type"
          )
  
imports: from typing import List, Optional, Union
  import collections
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: get_numpy_dtype_info(dtype) and returns: np, np