code: def tensor2np(item: Any) -> np.ndarray:
      tt = tensor_type(item)
      if item is None or tt == TensorType.Numpy:
          return item
      elif tt == TensorType.TF:
          return item.numpy()
      elif tt == TensorType.Torch:
          return item.data.cpu().numpy()
      else:  # numeric and everything else, let np take care
          return np.array(item)
  
file_path: tensorwatch/tensorwatch/tensor_utils.py
imports: from typing import Sized, Any, List
  import numbers
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: tensor2np(item) and returns: item, item, item, np