class_docstr: Multi-Head Attention layer inheriting SequenceModule.
  
  Comparing default MHA module in ESPnet, this module returns additional dummy state
  and has step function for autoregressive inference.
  
  Args:
      n_head (int): The number of heads.
      n_feat (int): The number of features.
      dropout_rate (float): Dropout rate.
docstr: Transform query, key and value.
  
  Args:
      query (torch.Tensor): Query tensor (#batch, time1, size).
      key (torch.Tensor): Key tensor (#batch, time2, size).
      value (torch.Tensor): Value tensor (#batch, time2, size).
  
  Returns:
      torch.Tensor: Transformed query tensor (#batch, n_head, time1, d_k).
      torch.Tensor: Transformed key tensor (#batch, n_head, time2, d_k).
      torch.Tensor: Transformed value tensor (#batch, n_head, time2, d_k).
code: def forward_qkv(self, query, key, value):
      """Transform query, key and value.
  
      Args:
          query (torch.Tensor): Query tensor (#batch, time1, size).
          key (torch.Tensor): Key tensor (#batch, time2, size).
          value (torch.Tensor): Value tensor (#batch, time2, size).
  
      Returns:
          torch.Tensor: Transformed query tensor (#batch, n_head, time1, d_k).
          torch.Tensor: Transformed key tensor (#batch, n_head, time2, d_k).
          torch.Tensor: Transformed value tensor (#batch, n_head, time2, d_k).
  
      """
      n_batch = query.size(0)
      q = self.linear_q(query).view(n_batch, -1, self.h, self.d_k)
      k = self.linear_k(key).view(n_batch, -1, self.h, self.d_k)
      v = self.linear_v(value).view(n_batch, -1, self.h, self.d_k)
      q = q.transpose(1, 2)  # (batch, head, time1, d_k)
      k = k.transpose(1, 2)  # (batch, head, time2, d_k)
      v = v.transpose(1, 2)  # (batch, head, time2, d_k)
  
      return q, k, v
  
file_path: espnet/espnet2/asr/state_spaces/attention.py
imports: import math
  import numpy
  import torch
  from torch import nn
  from espnet2.asr.state_spaces.base import SequenceModule
label_desc: Use image node_id 2 for calling the MultiHeadedAttention obj's underlying member method code with example usage: obj.forward_qkv(query, key, value) and returns: q,  k,  v