code: def to_torch_dtype(dtype):
      """Convert the dtype to pytorch data type
  
      Parameters
      ----------
      dtype
          The input dtype
  
      Returns
      -------
      ret
          Converted dtype
      """
      if isinstance(dtype, th.dtype) or dtype is None:
          return dtype
      dtype = np.dtype(dtype)
      if dtype in numpy_to_torch_dtype_dict:
          return numpy_to_torch_dtype_dict[dtype]
      else:
          raise KeyError(
              f"dtype = {dtype} is not supported for conversion"
          )
  
imports: import torch
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: to_torch_dtype(dtype) and returns: dtype, numpy_to_torch_dtype_dict