code: def forward(self, hidden_states, attention_mask):
      extended_attention_mask = (1.0 - attention_mask) * -10000.0
      output = self.encoder(
          hidden_states,
          extended_attention_mask,
          self.head_mask,
          return_dict=False,
      )
      return output
  
imports: from typing import List, Optional
  from loguru import logger
  from nebullvm.optional_modules.torch import torch, torch_distributed
  from nebullvm.optional_modules.huggingface import BertConfig, BertEmbeddings, BertEncoder, BertPooler, BertPreTrainedModel
  from .checkpoint_quantization import checkpoint_quantization
label_desc: Use image node_id 2 for calling the HuggingFaceEncoder obj's underlying member method code with example usage: obj.forward(hidden_states, attention_mask) and returns: output