code: def multinomial(
      population_size: int,
      num_samples: int,
      /,
      *,
      batch_size: int = 1,
      probs: Optional[torch.Tensor] = None,
      replace: bool = True,
      device: torch.device = None,
      seed: Optional[int] = None,
      out: Optional[torch.Tensor] = None,
  ) -> torch.Tensor:
      if probs is None:
          probs = (
              torch.ones(
                  (
                      batch_size,
                      population_size,
                  )
              )
              / population_size
          )
      if seed:
          torch.manual_seed(seed)
      return torch.multinomial(
          probs.float(), num_samples, replace, out=out
      ).to(device)
  
file_path: ivy/ivy/functional/backends/torch/random.py
imports: import torch
  from typing import Optional, Union, Sequence
  import ivy
  from ivy.functional.ivy.random import _check_bounds_and_get_shape, _randint_check_dtype_and_bound, _check_valid_scale
  from ivy.func_wrapper import with_unsupported_dtypes
  from .None import backend_version
label_desc: Use image node_id 3 for calling a global function with example usage: multinomial() and returns: torch