class_docstr: This module is a single transformer layer, mapping to `BertLayer` in the architecture in BERT.
  Details in the paper:
  [BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding, Devlin et al, 2019]
  (https://api.semanticscholar.org/CorpusID:52967399)
  
  # Parameters
  
  hidden_size : `int`
  intermediate_size : `int`
  num_attention_heads : `int`
  attention_dropout : `float` (default = `0.0`)
      Dropout probability for the `SelfAttention` layer.
  hidden_dropout : `float` (default = `0.0`)
      Dropout probability for the `OutputLayer`.
  activation : `Union[str, torch.nn.Module]`
  add_cross_attention : `bool` (default = `False`)
      If True, an extra `AttentionLayer` is added for cross-attention.
      This is helpful when using the layer in a decoder.
code: def get_output_dim(self) -> int:
      return self.output.get_output_dim()
  
imports: from typing import Union, Optional, TYPE_CHECKING
  from dataclasses import dataclass
  import torch
  from allennlp.common import FromParams
  from allennlp.modules.transformer.transformer_module import TransformerModule
  from allennlp.modules.transformer.activation_layer import ActivationLayer
  from allennlp.modules.transformer.attention_module import SelfAttention, AttentionOutput
  from allennlp.modules.transformer.output_layer import OutputLayer
  from allennlp.modules.transformer.util import FloatT
label_desc: Use image node_id 2 for calling the TransformerLayer obj's underlying member method code with example usage: obj.get_output_dim() and returns: self