code: def batch_multinomial_sampling(probs: np.ndarray) -> np.ndarray:
      """Batched version of multinomial sampling.
  
      Draws samples from a batch of multinomial distributions simultaneously.
      Note: this can be replaced once numpy provides API support for sampling from
      multinomial distributions simultaneously.
  
      Arguments:
        probs: A 2-D `np.ndarray` of shape `[batch_size, num_classes]`. A batch of
          probability vectors such that `probs.sum(-1) = 1`
  
      Returns:
        An 1-D `np.ndarray` representing the sampled indices.
      """
      return (
          probs.cumsum(-1)
          >= np.random.uniform(size=probs.shape[:-1])[..., None]
      ).argmax(-1)
  
imports: from typing import List
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: batch_multinomial_sampling(probs) and returns: unknown