code: def eigvalsh(a, UPLO="L"):
      """
      Compute the eigenvalues of a complex Hermitian or real symmetric matrix.
  
      Main difference from eigh: the eigenvectors are not computed.
  
      Args:
          a (cupy.ndarray): A symmetric 2-D square matrix ``(M, M)`` or a batch
              of symmetric 2-D square matrices ``(..., M, M)``.
          UPLO (str): Select from ``'L'`` or ``'U'``. It specifies which
              part of ``a`` is used. ``'L'`` uses the lower triangular part of
              ``a``, and ``'U'`` uses the upper triangular part of ``a``.
      Returns:
          cupy.ndarray:
              Returns eigenvalues as a vector ``w``. For batch input,
              ``w[k]`` is a vector of eigenvalues of matrix ``a[k]``.
  
      .. warning::
          This function calls one or more cuSOLVER routine(s) which may yield
          invalid results if input conditions are not met.
          To detect these invalid results, you can set the `linalg`
          configuration to a value that is not `ignore` in
          :func:`cupyx.errstate` or :func:`cupyx.seterr`.
  
      .. seealso:: :func:`numpy.linalg.eigvalsh`
      """
      import cupyx.cusolver
  
      _util._assert_stacked_2d(a)
      _util._assert_stacked_square(a)
  
      if a.size == 0:
          _, v_dtype = _util.linalg_common_type(a)
          w_dtype = v_dtype.char.lower()
          return cupy.empty(a.shape[:-1], w_dtype)
  
      if a.ndim > 2 or runtime.is_hip:
          return cupyx.cusolver.syevj(a, UPLO, False)
      else:
          return _syevd(a, UPLO, False)[0]
  
file_path: cupy/cupy/linalg/_eigenvalue.py
imports: import numpy
  import cupy
  from cupy.cuda import device
  from cupy.cuda import runtime
  from cupy.linalg import _util
  from cupy._core import _dtype
label_desc: Use image node_id 3 for calling a global function with example usage: eigvalsh(a, UPLO) and returns: cupy, cupyx, _syevd