docstr: Initialize decoder state.
docstr_tok: ["Initialize","decoder","state","."]
code: def init_state(self, src, enc_out, enc_final_hs):
      """Initialize decoder state."""
      self.state["src"] = src
  
imports: import torch
  import torch.nn
  from onmt.decoders.decoder import DecoderBase
  from onmt.modules import MultiHeadedAttention, AverageAttention
  from onmt.modules.position_ffn import PositionwiseFeedForward
  from onmt.modules.position_ffn import ActivationFunction
  from onmt.modules.moe import MoE
  from onmt.utils.misc import sequence_mask
  from onmt.modules.rmsnorm import RMSNorm
label_desc: Use image node_id 3 for calling the TransformerDecoderBase obj's underlying member method code with example usage: obj.init_state(src, enc_out, enc_final_hs) without return types