code: def test_multinomial(
      *, everything, seed, test_flags, backend_fw, fn_name, on_device
  ):
      (
          prob_dtype,
          batch_size,
          population_size,
          num_samples,
          replace,
          probs,
      ) = everything
  
      def call():
          return helpers.test_function(
              input_dtypes=prob_dtype,
              test_flags=test_flags,
              on_device=on_device,
              backend_to_test=backend_fw,
              fn_name=fn_name,
              test_values=False,
              population_size=population_size,
              num_samples=num_samples,
              batch_size=batch_size,
              probs=probs[0] if probs is not None else probs,
              replace=replace,
              seed=seed,
          )
  
      ret = call()
  
      if not ivy.exists(ret):
          return
  
      ret_np, ret_from_np = ret
      if seed:
          ret_np1, ret_from_np1 = call()
  
          assert ivy.any(ret_np == ret_np1)
  
      ret_np = helpers.flatten_and_to_np(ret=ret_np, backend=backend_fw)
      ret_from_np = helpers.flatten_and_to_np(
          ret=ret_from_np, backend=test_flags.ground_truth_backend
      )
      for u, v in zip(ret_np, ret_from_np):
          assert u.dtype == v.dtype
          assert u.shape == v.shape
  
file_path: ivy/ivy_tests/test_ivy/test_functional/test_core/test_random.py
imports: from hypothesis import strategies
  import ivy
  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_multinomial() and returns: helpers