code: def _asarray_torch(x, dtype=None, **kwargs):
      import torch
  
      dtype_map = {
          np.int8: torch.int8,
          np.int16: torch.int16,
          np.int32: torch.int32,
          np.int64: torch.int64,
          np.float16: torch.float16,
          np.float32: torch.float32,
          np.float64: torch.float64,
          np.complex64: torch.complex64,
          np.complex128: torch.complex128,
          "float64": torch.float64,
      }
  
      if dtype in dtype_map:
          return torch.as_tensor(x, dtype=dtype_map[dtype], **kwargs)
  
      return torch.as_tensor(x, dtype=dtype, **kwargs)
  
imports: from importlib import import_module
  import autoray
  import numpy
  import semantic_version
  from scipy.linalg import block_diag
  from .utils import get_deep_interface
label_desc: Use image node_id 26 for calling a global function with example usage: _asarray_torch(x, dtype) and returns: torch, torch