code: def detach(tensor, like=None):
      """Detach a tensor from its trace and return just its numerical values.
  
      Args:
          tensor (tensor_like): Tensor to detach
          like (str): Manually chosen interface to dispatch to.
  
      Returns:
          tensor_like: A tensor in the same interface as the input tensor but
          with a stopped gradient.
      """
      if like == "jax":
          import jax
  
          return jax.lax.stop_gradient(tensor)
  
      if like == "torch":
          return tensor.detach()
  
      if like == "tensorflow":
          import tensorflow as tf
  
          return tf.stop_gradient(tensor)
  
      if like == "autograd":
          return np.to_numpy(tensor)
  
      return tensor
  
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 26 for calling a global function with example usage: detach(tensor, like) and returns: tensor, jax, tensor, tf, np