class_docstr: BERT attention layer.
  Based on: BERT (pytorch-transformer)
  https://github.com/huggingface/transformers
code: def forward(self, hidden_states, context):
      mixed_query_layer = self.query(hidden_states)
      mixed_key_layer = self.key(context)
      mixed_value_layer = self.value(context)
      query_layer = self.transpose_for_scores(mixed_query_layer)
      key_layer = self.transpose_for_scores(mixed_key_layer)
      value_layer = self.transpose_for_scores(mixed_value_layer)
      attention_scores = torch.matmul(
          query_layer, key_layer.transpose(-1, -2)
      )
      attention_scores = attention_scores / math.sqrt(
          self.attention_head_size
      )
      attention_probs = self.dropout(
          nn.Softmax(dim=-1)(attention_scores)
      )
      context_layer = torch.matmul(attention_probs, value_layer)
      context_layer = context_layer.permute(0, 2, 1, 3).contiguous()
      new_context_layer_shape = context_layer.size()[:-2] + (
          self.all_head_size,
      )
      context_layer = context_layer.view(*new_context_layer_shape)
      return context_layer
  
imports: from __future__ import annotations
  import math
  from collections.abc import Sequence
  import torch
  from torch import nn
  from monai.config.type_definitions import PathLike
  from monai.utils import optional_import
label_desc: Use image node_id 3 for calling the BertAttention obj's underlying member method code with example usage: obj.forward(hidden_states, context) and returns: context_layer