code: def __init__(
      self,
      beam_size,
      vocab_size,
      eos_id,
      state_batch_axis,
      sampling_topp=-1.0,
      sampling_topk=-1,
      temperature=1.0,
  ):
      super().__init__()
      self._beam_size = beam_size
      self._vocab_size = vocab_size
      self._eos_id = eos_id
      self._state_batch_axis = state_batch_axis
      self._sampling_topp = sampling_topp
      self._sampling_topk = sampling_topk
      self._temperature = temperature
      assert (
          eos_id is None or eos_id >= 0
      ), "eos_id cannot be negative! Received eos_id={}".format(eos_id)
      assert (
          sampling_topp <= 0 or sampling_topk <= 0
      ), "sampling_topp conflicts with sampling_topk"
  
imports: import warnings
  import mxnet
  import abc
  from mxnet.gluon import HybridBlock
  from typing import Callable, Optional
  from .layers import get_activation
label_desc: Use image node_id 1 to create a new _MultinomialStepUpdate object from inherited base classes: HybridBlock with example: obj = _MultinomialStepUpdate(beam_size, vocab_size, eos_id, state_batch_axis, sampling_topp, sampling_topk, temperature)