code: def multinomial(
      population_size: int,
      num_samples: int,
      /,
      *,
      batch_size: int = 1,
      probs: Optional[paddle.Tensor] = None,
      replace: bool = True,
      device: core.Place = None,
      seed: Optional[int] = None,
      out: Optional[paddle.Tensor] = None,
  ) -> paddle.Tensor:
      if probs is None:
          probs = (
              paddle.ones((batch_size, num_samples)) / population_size
          )
          probs = paddle.cast(probs, paddle.float32)
      if seed:
          paddle.seed(seed)
      x = paddle.multinomial(
          probs, num_samples=num_samples, replacement=replace
      )
      return x
  
file_path: ivy/ivy/functional/backends/paddle/random.py
imports: import paddle
  import ivy.functional.backends.paddle
  from typing import Optional, Union, Sequence
  import ivy
  from paddle.device import core
  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_device_and_dtypes, with_supported_device_and_dtypes, 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: x