class_docstr: Poly-encoder model.
  
  See https://arxiv.org/abs/1905.01969 for more details
class_docstr_tok: ["Poly-encoder","model",".","See","https",":","\/\/arxiv.org\/abs\/1905.01969","for","more","details"]
docstr: Return the batch size of the context.
  
  Can be overridden by subclasses that do not always have text tokens in the
  context.
docstr_tok: ["Return","the","batch","size","of","the","context",".","Can","be","overridden","by","subclasses","that","do","not","always","have","text","tokens","in","the","context","."]
code: def _get_context_batch_size(self, **ctxt_inputs: torch.Tensor) -> int:
      """
      Return the batch size of the context.
  
      Can be overridden by subclasses that do not always have text tokens in the
      context.
      """
      return ctxt_inputs["ctxt_tokens"].size(0)
  
imports: from parlai.core.params import ParlaiParser
  from typing import Any, Dict, Optional, Tuple
  import torch
  from parlai.core.opt import Opt
  from parlai.core.torch_ranker_agent import TorchRankerAgent
  from parlai.core.torch_agent import Batch
  from parlai.utils.misc import recursive_getattr
  from parlai.utils.logging import logging
  from .biencoder import AddLabelFixedCandsTRA
  from .modules import BasicAttention, MultiHeadAttention, TransformerEncoder
  from .transformer import TransformerRankerAgent
label_desc: Use image node_id 6 for calling the PolyEncoderModule obj's underlying member method code with example usage: obj._get_context_batch_size() and returns: ctxt_inputs