code: def _sum_torch(tensor, axis=None, keepdims=False, dtype=None):
      import torch
  
      if axis is None:
          return torch.sum(tensor, dtype=dtype)
  
      if not isinstance(axis, int) and len(axis) == 0:
          return tensor
  
      return torch.sum(tensor, dim=axis, keepdim=keepdims, dtype=dtype)
  
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 37 for calling a global function with example usage: _sum_torch(tensor, axis, keepdims, dtype) and returns: torch, torch, tensor