code: def test_numpy_eigh(
      *,
      dtype_and_x,
      UPLO,
      on_device,
      fn_tree,
      frontend,
      test_flags,
      backend_fw,
  ):
      dtype, x = dtype_and_x
      x = np.array(x[0], dtype=dtype[0])
      # make symmetric positive-definite beforehand
      x = np.matmul(x.T, x) + np.identity(x.shape[0]) * 1e-3
  
      ret, frontend_ret = helpers.test_frontend_function(
          input_dtypes=dtype,
          backend_to_test=backend_fw,
          frontend=frontend,
          test_flags=test_flags,
          fn_tree=fn_tree,
          on_device=on_device,
          test_values=False,
          a=x,
          UPLO=UPLO,
      )
      with BackendHandler.update_backend(backend_fw) as ivy_backend:
          ret = [ivy_backend.to_numpy(x) for x in ret]
          frontend_ret = [np.asarray(x) for x in frontend_ret]
          L, Q = ret
          frontend_L, frontend_Q = frontend_ret
  
          assert_all_close(
              ret_np=Q @ np.diag(L) @ Q.T,
              ret_from_gt_np=frontend_Q
              @ np.diag(frontend_L)
              @ frontend_Q.T,
              atol=1e-02,
              backend=backend_fw,
              ground_truth_backend=frontend,
          )
  
file_path: ivy/ivy_tests/test_ivy/test_frontends/test_numpy/test_linalg/test_matrix_eigenvalues.py
imports: import sys
  from hypothesis import strategies
  import numpy
  import ivy_tests.test_ivy.helpers
  from ivy_tests.test_ivy.helpers import handle_frontend_test, assert_all_close, BackendHandler
  from ivy_tests.test_ivy.test_functional.test_core.test_linalg import _get_dtype_and_matrix
label_desc: Use image node_id 2 for calling a global function with example usage: test_numpy_eigh() without return types