code: def test_dirichlet(
      *,
      dtype_and_alpha,
      size,
      seed,
      test_flags,
      backend_fw,
      fn_name,
      on_device,
  ):
      dtype, alpha = dtype_and_alpha
      assume("bfloat16" not in dtype)
  
      def call():
          return helpers.test_function(
              input_dtypes=dtype,
              test_flags=test_flags,
              test_values=False,
              backend_to_test=backend_fw,
              fn_name=fn_name,
              on_device=on_device,
              alpha=alpha[0],
              size=size,
              seed=seed,
          )
  
      ret, ret_gt = call()
      with BackendHandler.update_backend(backend_fw) as ivy_backend:
          if seed:
              ret1, ret_gt1 = call()
              assert ivy_backend.any(ret == ret1)
          ret = helpers.flatten_and_to_np(ret=ret, backend=backend_fw)
          ret_gt = helpers.flatten_and_to_np(
              ret=ret_gt, backend=test_flags.ground_truth_backend
          )
          for u, v in zip(ret, ret_gt):
              u, v = ivy_backend.array(u), ivy_backend.array(v)
              assert ivy_backend.all(
                  ivy_backend.sum(u, axis=-1)
                  == ivy_backend.sum(v, axis=-1)
              )
              assert ivy_backend.all(u >= 0)
              assert ivy_backend.all(u <= 1)
              assert ivy_backend.all(v >= 0)
              assert ivy_backend.all(v <= 1)
  
file_path: ivy/ivy_tests/test_ivy/test_functional/test_experimental/test_core/test_random.py
imports: from hypothesis import strategies, assume
  import ivy_tests.test_ivy.helpers
  from ivy_tests.test_ivy.helpers import handle_test, BackendHandler
label_desc: Use image node_id 3 for calling a global function with example usage: test_dirichlet() and returns: helpers