code: def handle_array(arg):
      if not isinstance(arg, TENSOR_TYPE):
          if not isinstance(arg, Iterable):
              return arg
  
          arg = np.asarray(arg)
          return arg[(0,) * max(1, arg.ndim)]
      elif hasattr(arg, "op") and hasattr(arg.op, "data"):
          return arg.op.data[(0,) * max(1, arg.ndim)]
  
      return np.empty((0,), dtype=arg.dtype)
  
imports: import itertools
  from collections.abc import Iterable
  from contextlib import contextmanager
  import numpy
  from ...config import options
  from ...core import recursive_tile
  from ...serialization.serializables import FieldTypes, TupleField, Int32Field
  from ..core import TENSOR_TYPE, TENSOR_CHUNK_TYPE
  from ..utils import decide_chunk_sizes, gen_random_seeds, broadcast_shape
  from ..array_utils import array_module, device
  from ..operands import TensorOperand, TensorMapReduceOperand, TensorOperandMixin
  from ..datasource import tensor
  from ..base import broadcast_to
label_desc: Use image node_id 1 for calling a global function with example usage: handle_array(arg) and returns: np, arg, arg, arg