code: def unwrap(values, max_depth=None):
      """Unwrap a sequence of objects to NumPy arrays.
  
      Note that tensors on GPUs will automatically be copied
      to the CPU.
  
      Args:
          values (Sequence[tensor_like]): sequence of tensor-like objects to unwrap
          max_depth (int): Positive integer indicating the depth of unwrapping to perform
              for nested tensor-objects. This argument only applies when unwrapping
              Autograd ``ArrayBox`` objects.
  
      **Example**
  
      >>> values = [np.array([0.1, 0.2]), torch.tensor(0.1, dtype=torch.float64), torch.tensor([0.5, 0.2])]
      >>> math.unwrap(values)
      [array([0.1, 0.2]), 0.1, array([0.5, 0.2], dtype=float32)]
  
      This function will continue to work during backpropagation:
  
      >>> def cost_fn(params):
      ...     unwrapped_params = math.unwrap(params)
      ...     print("Unwrapped:", [(i, type(i)) for i in unwrapped_params])
      ...     return np.sum(np.sin(params))
      >>> params = np.array([0.1, 0.2, 0.3])
      >>> grad = autograd.grad(cost_fn)(params)
      Unwrapped: [(0.1, <class 'float'>), (0.2, <class 'float'>), (0.3, <class 'float'>)]
      >>> print(grad)
      [0.99500417 0.98006658 0.95533649]
      """
  
      def convert(val):
          if isinstance(val, (tuple, list)):
              return unwrap(val)
          new_val = (
              np.to_numpy(val, max_depth=max_depth)
              if isinstance(val, ArrayBox)
              else np.to_numpy(val)
          )
          return (
              new_val.tolist()
              if isinstance(new_val, ndarray) and not new_val.shape
              else new_val
          )
  
      if isinstance(values, (tuple, list)):
          return type(values)(convert(val) for val in values)
      return (
          np.to_numpy(values, max_depth=max_depth)
          if isinstance(values, ArrayBox)
          else np.to_numpy(values)
      )
  
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 19 for calling a global function with example usage: unwrap(values, max_depth) and returns: unknown, unknown, type, unwrap