class_docstr: Model which takes context, memories, candidates and encodes them.
class_docstr_tok: ["Model","which","takes","context",",","memories",",","candidates","and","encodes","them","."]
code: def build_context_encoder(
      cls,
      opt,
      dictionary,
      embedding=None,
      padding_idx=None,
      reduction_type="mean",
  ):
      return cls.build_encoder(
          opt, dictionary, embedding, padding_idx, reduction_type
      )
  
file_path: ParlAI/parlai/agents/transformer/modules/mem_net.py
imports: import torch
  import torch.nn
  from typing import Optional, Tuple
  from parlai.agents.transformer.modules import create_embeddings, BasicAttention, TransformerEncoder, TransformerResponseWrapper
  from parlai.core.opt import Opt
  from parlai.core.torch_agent import DictionaryAgent
label_desc: Use image node_id 1 for calling the TransformerMemNetModel obj's underlying member method code with example usage: obj.build_context_encoder(cls, opt, dictionary, embedding, padding_idx, reduction_type) and returns: cls