code: def test_svd(
      *, dtype_x, uv, fm, test_flags, backend_fw, fn_name, on_device
  ):
      dtype, x = dtype_x
  
      results = helpers.test_function(
          input_dtypes=dtype,
          test_flags=test_flags,
          backend_to_test=backend_fw,
          fn_name=fn_name,
          on_device=on_device,
          x=x[0],
          compute_uv=uv,
          full_matrices=fm,
          test_values=False,
          return_flat_np_arrays=True,
      )
      if results is None:
          return
  
      # value test based on recreating the original matrix and testing the consistency
      ret_flat_np, ret_from_gt_flat_np = results
  
      if uv:
          for i in range(len(ret_flat_np) // 3):
              U = ret_flat_np[i]
              S = ret_flat_np[len(ret_flat_np) // 3 + i]
              Vh = ret_flat_np[2 * len(ret_flat_np) // 3 + i]
          m = U.shape[-1]
          n = Vh.shape[-1]
          S = np.expand_dims(S, -2) if m > n else np.expand_dims(S, -1)
  
          for i in range(len(ret_from_gt_flat_np) // 3):
              U_gt = ret_from_gt_flat_np[i]
              S_gt = ret_from_gt_flat_np[
                  len(ret_from_gt_flat_np) // 3 + i
              ]
              Vh_gt = ret_from_gt_flat_np[
                  2 * len(ret_from_gt_flat_np) // 3 + i
              ]
          S_gt = (
              np.expand_dims(S_gt, -2)
              if m > n
              else np.expand_dims(S_gt, -1)
          )
  
          with BackendHandler.update_backend("numpy") as ivy_backend:
              S_mat = (
                  S
                  * ivy_backend.eye(
                      U.shape[-1],
                      Vh.shape[-2],
                      batch_shape=U.shape[:-2],
                  ).data
              )
              S_mat_gt = (
                  S_gt
                  * ivy_backend.eye(
                      U_gt.shape[-1],
                      Vh_gt.shape[-2],
                      batch_shape=U_gt.shape[:-2],
                  ).data
              )
          reconstructed = np.matmul(np.matmul(U, S_mat), Vh)
          reconstructed_gt = np.matmul(np.matmul(U_gt, S_mat_gt), Vh_gt)
  
          # value test
          helpers.assert_all_close(
              reconstructed,
              reconstructed_gt,
              atol=1e-04,
              backend=backend_fw,
              ground_truth_backend=test_flags.ground_truth_backend,
          )
          helpers.assert_all_close(
              reconstructed,
              x[0],
              atol=1e-04,
              backend=backend_fw,
              ground_truth_backend=test_flags.ground_truth_backend,
          )
      else:
          S = ret_flat_np
          S_gt = ret_from_gt_flat_np
          helpers.assert_all_close(
              S[0],
              S_gt[0],
              atol=1e-04,
              backend=backend_fw,
              ground_truth_backend=test_flags.ground_truth_backend,
          )
  
imports: import sys
  import numpy
  from hypothesis import assume, strategies
  import ivy_tests.test_ivy.helpers
  from ivy_tests.test_ivy.helpers import handle_test, BackendHandler
  from ivy_tests.test_ivy.helpers.hypothesis_helpers.general_helpers import matrix_is_stable
label_desc: Use image node_id 29 for calling a global function with example usage: test_svd() without return types