code: def array(*args, like=None, **kwargs):
      """Creates an array or tensor object of the target framework.
  
      If the PyTorch interface is specified, this method preserves the Torch device used.
      If the JAX interface is specified, this method uses JAX numpy arrays, which do not cause issues with jit tracers.
  
      Returns:
          tensor_like: the tensor_like object of the framework
      """
      res = np.array(*args, like=like, **kwargs)
      if like is not None and get_interface(like) == "torch":
          res = res.to(device=like.device)
      return res
  
imports: import functools
  from collections.abc import Sequence
  import autoray
  import numpy
  from autograd.numpy.numpy_boxes import ArrayBox
  from autoray import numpy
  from numpy import ndarray
  from .None import single_dispatch
  from .utils import cast, cast_like, get_interface, requires_grad
label_desc: Use image node_id 1 for calling a global function with example usage: array() and returns: res