code: def tensor2scaler(item: Any) -> numbers.Number:
      tt = tensor_type(item)
      if item is None or tt == TensorType.Numeric:
          return item
      if tt == TensorType.TF:
          item = item.numpy()
      return item.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 2 for calling a global function with example usage: tensor2scaler(item) and returns: item, item