code: def multinomial(target, dev, gen, probs, num_samples):
      gen_placeholder = tvm.te.placeholder(
          gen.shape, name="gen", dtype="uint64"
      )
      probs_placeholder = tvm.te.placeholder(
          probs.shape, name="probs", dtype="float32"
      )
      (
          new_gen_placeholder,
          indices_placeholder,
      ) = tvm.topi.random.multinomial(
          gen_placeholder, probs_placeholder, num_samples
      )
      s = tvm.topi.generic.schedule_extern(
          [new_gen_placeholder, indices_placeholder]
      )
      f = tvm.build(
          s,
          [
              gen_placeholder,
              probs_placeholder,
              new_gen_placeholder,
              indices_placeholder,
          ],
          target=target,
      )
      out_gen = tvm.nd.array(
          np.zeros(gen.shape, dtype="uint64"), device=dev
      )
      indices = tvm.nd.array(
          np.zeros((*probs.shape[:-1], num_samples), dtype="int32"),
          device=dev,
      )
      f(tvm.nd.array(gen), tvm.nd.array(probs), out_gen, indices)
      return out_gen.numpy(), indices.asnumpy()
  
file_path: tvm/tests/python/topi/test_topi_prng.py
imports: import tvm
  import tvm.relay
  import tvm.testing
  import tvm.topi
  import numpy
  import scipy.stats
label_desc: Use image node_id 4 for calling a global function with example usage: multinomial(target, dev, gen, probs, num_samples) and returns: out_gen,  indices