code: def as_torch_dtype(dtype: TypeSpec) -> torch.dtype:
      if isinstance(dtype, torch.dtype):
          return dtype
      if isinstance(dtype, str):
          dtype = np.dtype(dtype)
      assert isinstance(
          dtype, np.dtype
      ), f"Expected an instance of nunpy dtype, got {type(dtype)}"
      return _NUMPY_TO_TORCH_DTYPE[dtype]
  
label_desc: Use image node_id 1 for calling a global function with example usage: as_torch_dtype(dtype) and returns: _NUMPY_TO_TORCH_DTYPE, dtype