code: def tensors_to_numpy(tensors):
      # TODO: add more type transformation here
      def to_numpy(ts):
          result = []
          for x in ts:
              if isinstance(x, torch.Tensor):
                  result.append(x.cpu().detach().numpy())
              elif isinstance(x, np.ndarray):
                  result.append(x)
              elif np.isscalar(x):
                  # convert scalar to numpy
                  result.append(np.array(x))
              elif isinstance(x, Sequence):
                  result.append(to_numpy(x))
              else:
                  invalidInputError(False, f"Unexpected Type: {x}")
          return tuple(result)
  
      return to_numpy(tensors)
  
file_path: BigDL/python/nano/src/bigdl/nano/pytorch/model.py
imports: import torch
  from bigdl.nano.pytorch.lightning import LightningModule
  from bigdl.nano.utils.common import invalidInputError
  from bigdl.nano.utils.common import AcceleratedModel
  import numpy
  from typing import Sequence
label_desc: Use image node_id 7 for calling the AcceleratedLightningModule obj's underlying member method code with example usage: obj.tensors_to_numpy(tensors) and returns: to_numpy, tuple