class_docstr: Multi-Head Attention layer of Transformer.
  Args:
      n_head (int): number of heads
      n_feat (int): size of the features
      dropout_rate (float): dropout rate
class_docstr_tok: ["Multi-Head","Attention","layer","of","Transformer",".","Args",":","n_head","(","int",")",":","number","of","heads","n_feat","(","int",")",":","size","of","the","features","dropout_rate","(","float",")",":","dropout","rate"]
code: def update_cache(self, key, value, query, cache):
      if cache is not None:
          key = value = torch.cat([cache, key], dim=1)
          q_keep_size = query.shape[1] - self.cache_drop_size
          cache = torch.cat(
              [cache[:, q_keep_size:, :], query[:, :q_keep_size, :]],
              dim=1,
          )
      return key, value, query, cache
  
imports: import math
  from functools import lru_cache
  from typing import List, Tuple
  import torch
  import torch.nn
  import torch.nn.functional
  from nemo.utils import avoid_float16_autocast_context
label_desc: Use image node_id 5 for calling the MultiHeadAttention obj's underlying member method code with example usage: obj.update_cache(key, value, query, cache) and returns: key,  value,  query,  cache