code: def forward(
      self,
      token_idx_ctxt,
      segment_idx_ctxt,
      mask_ctxt,
      token_idx_cands,
      segment_idx_cands,
      mask_cands,
  ):
      embedding_ctxt = None
      if token_idx_ctxt is not None:
          embedding_ctxt = self.context_encoder(
              token_idx_ctxt, segment_idx_ctxt, mask_ctxt
          )
      embedding_cands = None
      if token_idx_cands is not None:
          embedding_cands = self.cand_encoder(
              token_idx_cands, segment_idx_cands, mask_cands
          )
      return embedding_ctxt, embedding_cands
  
imports: import os
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from tqdm import tqdm
  from pytorch_transformers.modeling_bert import BertPreTrainedModel, BertConfig, BertModel
  from pytorch_transformers.tokenization_bert import BertTokenizer
  from blink.common.ranker_base import BertEncoder, get_model_obj
  from blink.common.optimizer import get_bert_optimizer
label_desc: Use image node_id 2 for calling the BiEncoderModule obj's underlying member method code with example usage: obj.forward(token_idx_ctxt, segment_idx_ctxt, mask_ctxt, token_idx_cands, segment_idx_cands, mask_cands) and returns: embedding_ctxt,  embedding_cands