class_docstr: Multi-headed attention.
  
  See "Attention Is All You Need" for more details.
class_docstr_tok: ["Multi-headed","attention",".","See","``","Attention","Is","All","You","Need","''","for","more","details","."]
code: def _get_input_buffer(
      self,
      incremental_state: Optional[
          Dict[str, Dict[str, Optional[Tensor]]]
      ],
  ) -> Dict[str, Optional[Tensor]]:
      result = self.get_incremental_state(
          incremental_state, "attn_state"
      )
      if result is not None:
          return result
      else:
          empty_result: Dict[str, Optional[Tensor]] = {}
          return empty_result
  
imports: import math
  from typing import Dict, List, Optional, Tuple
  import torch
  import torch.nn.functional
  from torch import Tensor, nn
  from torch.nn import Parameter
  from fairseq import utils
  from fairseq.modules.fairseq_dropout import FairseqDropout
  from fairseq.modules.quant_noise import quant_noise
  from fairseq.models.fairseq_incremental_decoder import FairseqIncrementalDecoder
label_desc: Use image node_id 15 for calling the MultiheadAttention obj's underlying member method code with example usage: obj._get_input_buffer(incremental_state) and returns: result, empty_result