class_docstr: Multi-Head Attention module from "Attention is All You Need"
  :cite:`DBLP:journals/corr/VaswaniSPUJGKP17`.
  
  Similar to standard `dot` attention but uses
  multiple attention distributions simulataneously
  to select relevant items.
  
  .. mermaid::
  
     graph BT
        A[key]
        B[value]
        C[query]
        O[output]
        subgraph Attn
          D[Attn 1]
          E[Attn 2]
          F[Attn N]
        end
        A --> D
        C --> D
        A --> E
        C --> E
        A --> F
        C --> F
        D --> O
        E --> O
        F --> O
        B --> O
  
  Also includes several additional tricks.
  
  Args:
     head_count (int): number of parallel heads
     model_dim (int): the dimension of keys/values/queries,
         must be divisible by head_count
     dropout (float): dropout parameter
     max_relative_positions (int): max relative positions
     attn_type: "self" or "context"
code: def update_dropout(self, dropout: float) -> None:
      self.dropout.p = dropout
      self.dropout_p = dropout
  
imports: import torch
  import torch.nn
  from math import log, sqrt
  from torch import Tensor
  from typing import Optional, Tuple
  from torch.nn.functional import scaled_dot_product_attention
  from torch.utils.checkpoint import checkpoint
  from torch.nn.utils import skip_init
  from .alibi_position_bias import AlibiPositionalBias
  from torch.distributed import all_reduce
  from importlib import import_module
label_desc: Use image node_id 2 for calling the MultiHeadedAttention obj's underlying member method code with example usage: obj.update_dropout(dropout) without return types