code: def call(self, x, sent_ids, training, mask):
      seq_len = tf.shape(x)[1]
      # make attention mask consumable for huggingface transformes
      # 1 for non-masked tokens, 0 for masked tokens
      mask = mask[:, 0, 0, :]
      attention_mask = tf.cast(tf.math.equal(mask, 0), tf.int32)
      if self.bert_embedding_name is not None:
          x = {
              "input_ids": x,
              "token_type_ids": sent_ids,
              "attention_mask": attention_mask,
          }
          x = self.embedding(x, training=training)[0]
      else:
          x = self.embedding(x)
          x *= tf.math.sqrt(tf.cast(self.embedding_size, tf.float32))
          x += self.pos_encoding[:, :seq_len, :]
      x = self.dropout(x, training=training)
      for i in range(self.num_layers):
          x = self.enc_layers[i](x, training, mask)
      return x
  
file_path: headliner/headliner/model/bert_model.py
imports: from typing import Tuple
  from transformers import TFBertModel
  from headliner.model.transformer_util import *
label_desc: Use image node_id 2 for calling the Encoder obj's underlying member method code with example usage: obj.call(x, sent_ids, training, mask) and returns: x