code: def test_numpy_trapz(
      dtype_values_axis,
      rand_either,
      fn_tree,
      frontend,
      test_flags,
      on_device,
      backend_fw,
  ):
      input_dtype, y, axis = dtype_values_axis
      rand, either_x_dx = rand_either
      if rand == 0:
          dtype_x, x = either_x_dx
          x = np.asarray(x, dtype=dtype_x)
          dx = None
      else:
          x = None
          dx = either_x_dx
      helpers.test_frontend_function(
          input_dtypes=input_dtype,
          backend_to_test=backend_fw,
          frontend=frontend,
          fn_tree=fn_tree,
          test_flags=test_flags,
          on_device=on_device,
          y=np.asarray(y[0], dtype=input_dtype[0]),
          x=x,
          dx=dx,
          axis=axis,
      )
  
file_path: ivy/ivy_tests/test_ivy/test_frontends/test_numpy/test_mathematical_functions/test_sums_products_differences.py
imports: import numpy
  from hypothesis import strategies, assume
  import ivy_tests.test_ivy.helpers
  import ivy_tests.test_ivy.test_frontends.test_numpy.helpers
  from ivy_tests.test_ivy.helpers import handle_frontend_test
label_desc: Use image node_id 13 for calling a global function with example usage: test_numpy_trapz(dtype_values_axis, rand_either, fn_tree, frontend, test_flags, on_device, backend_fw) without return types