code: def value_test(
      *,
      ret_np_flat,
      ret_np_from_gt_flat,
      rtol=None,
      atol=1e-6,
      specific_tolerance_dict=None,
      backend: str,
      ground_truth_backend="TensorFlow",
  ):
      """Perform a value test for matching the arrays in ret_np_flat and
      ret_from_np_gt_flat.
  
      Parameters
      ----------
      ret_np_flat
          A list (flattened) containing Numpy arrays. Return from the
          framework to test.
      ret_np_from_gt_flat
          A list (flattened) containing Numpy arrays. Return from the ground
          truth framework.
      rtol
          Relative Tolerance Value.
      atol
          Absolute Tolerance Value.
      specific_tolerance_dict
          (Optional) Dictionary of specific rtol and atol values according to the dtype.
      ground_truth_backend
          Ground Truth Backend Framework.
  
      Returns
      -------
      None if the value test passes, else marks the test as failed.
      """
      assert_same_type_and_shape([ret_np_flat, ret_np_from_gt_flat])
  
      if type(ret_np_flat) != list:  # noqa: E721
          ret_np_flat = [ret_np_flat]
      if type(ret_np_from_gt_flat) != list:  # noqa: E721
          ret_np_from_gt_flat = [ret_np_from_gt_flat]
      assert len(ret_np_flat) == len(ret_np_from_gt_flat), (
          f"The length of results from backend {backend} and ground truth framework"
          f" {ground_truth_backend} does not match\n\nlen(ret_np_flat) !="
          f" len(ret_np_from_gt_flat):\n\nret_np_flat:\n\n{ret_np_flat}\n\n"
          f"ret_np_from_gt_flat:\n\n{ret_np_from_gt_flat}"
      )
      # value tests, iterating through each array in the flattened returns
      if specific_tolerance_dict is not None:
          for ret_np, ret_np_from_gt in zip(
              ret_np_flat, ret_np_from_gt_flat
          ):
              dtype = str(ret_np_from_gt.dtype)
              if specific_tolerance_dict.get(dtype) is not None:
                  rtol = specific_tolerance_dict.get(dtype)
              else:
                  rtol = (
                      TOLERANCE_DICT.get(dtype, 1e-03)
                      if rtol is None
                      else rtol
                  )
              assert_all_close(
                  ret_np,
                  ret_np_from_gt,
                  backend=backend,
                  rtol=rtol,
                  atol=atol,
                  ground_truth_backend=ground_truth_backend,
              )
      elif rtol is not None:
          for ret_np, ret_np_from_gt in zip(
              ret_np_flat, ret_np_from_gt_flat
          ):
              assert_all_close(
                  ret_np,
                  ret_np_from_gt,
                  backend=backend,
                  rtol=rtol,
                  atol=atol,
                  ground_truth_backend=ground_truth_backend,
              )
      else:
          for ret_np, ret_np_from_gt in zip(
              ret_np_flat, ret_np_from_gt_flat
          ):
              rtol = TOLERANCE_DICT.get(
                  str(ret_np_from_gt.dtype), 1e-03
              )
              assert_all_close(
                  ret_np,
                  ret_np_from_gt,
                  backend=backend,
                  rtol=rtol,
                  atol=atol,
                  ground_truth_backend=ground_truth_backend,
              )
  
file_path: ivy/ivy_tests/test_ivy/helpers/assertions.py
imports: import ivy
  import numpy
label_desc: Use image node_id 4 for calling a global function with example usage: value_test() without return types