code: def eigvals(tensor, name=None):
      """Computes the eigenvalues of one or more matrices.
  
      Note: If your program backpropagates through this function, you should replace
      it with a call to tf.linalg.eig (possibly ignoring the second output) to
      avoid computing the eigen decomposition twice. This is because the
      eigenvectors are used to compute the gradient w.r.t. the eigenvalues. See
      _SelfAdjointEigV2Grad in linalg_grad.py.
  
      Args:
        tensor: `Tensor` of shape `[..., N, N]`.
        name: string, optional name of the operation.
  
      Returns:
        e: Eigenvalues. Shape is `[..., N]`. The vector `e[..., :]` contains the `N`
          eigenvalues of `tensor[..., :, :]`.
      """
      if (
          tensor.dtype == dtypes.float32
          or tensor.dtype == dtypes.complex64
      ):
          out_dtype = dtypes.complex64
      elif (
          tensor.dtype == dtypes.float64
          or tensor.dtype == dtypes.complex128
      ):
          out_dtype = dtypes.complex128
      e, _ = gen_linalg_ops.eig(
          tensor, Tout=out_dtype, compute_v=False, name=name
      )
      return e
  
imports: import numpy
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import cond
  from tensorflow.python.ops import gen_array_ops
  from tensorflow.python.ops import gen_linalg_ops
  from tensorflow.python.ops import linalg_ops_impl
  from tensorflow.python.ops import map_fn
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops.gen_linalg_ops import *
  from tensorflow.python.util import deprecation
  from tensorflow.python.util import dispatch
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 7 for calling a global function with example usage: eigvals(tensor, name) and returns: e