class_docstr: Bert Language model.
  Model returns [seq, batch, hidden] shape
class_docstr_tok: ["Bert","Language","model",".","Model","returns","[","seq",",","batch",",","hidden","]","shape"]
code: def forward(
      self,
      bert_model_input,
      attention_mask,
      token_type_ids=None,
      lm_labels=None,
      checkpoint_activations_all_layers=None,
  ):
      extended_attention_mask = bert_extended_attention_mask(
          attention_mask
      )
  
      if parallel_state.is_pipeline_first_stage():
          input_ids = bert_model_input
          position_ids = build_position_ids(input_ids)
      else:
          position_ids = None
          input_ids = None
  
      lm_output = self.language_model(
          input_ids,
          position_ids,
          extended_attention_mask,
          token_type_ids=token_type_ids,
          checkpoint_activations_all_layers=checkpoint_activations_all_layers,
      )
  
      if self.post_process and self.add_binary_head:
          lm_output, pooled_output = lm_output
      else:
          pooled_output = None
  
      if self.post_process:
          return post_language_model_processing(
              lm_output,
              pooled_output,
              self.lm_head,
              self.binary_head,
              lm_labels,
              self.word_embeddings_weight(),
              self.fp16_lm_cross_entropy,
          )
      else:
          return lm_output
  
file_path: NeMo/nemo/collections/nlp/models/language_modeling/megatron/bert_model.py
imports: import torch
  from nemo.collections.nlp.modules.common.megatron.language_model import get_language_model
  from nemo.collections.nlp.modules.common.megatron.module import MegatronModule
  from nemo.collections.nlp.modules.common.megatron.transformer import get_layer_norm
  from nemo.collections.nlp.modules.common.megatron.utils import ApexGuardDefaults, build_position_ids, erf_gelu, get_linear_layer, init_method_normal, openai_gelu, parallel_lm_logits, scaled_init_method_normal
label_desc: Use image node_id 3 for calling the BertModel obj's underlying member method code with example usage: obj.forward(bert_model_input, attention_mask, token_type_ids, lm_labels, checkpoint_activations_all_layers) and returns: post_language_model_processing, lm_output