class_docstr: Wrapper representation for a pair of inputs.
  
  Takes a tuple of inputs: the left sentence, and the right sentence(s). Returns
  a representation of the pair of sentences, either as a concatenation of the two
  sentence embeddings or as a "siamese" representation which also includes their
  difference and elementwise product (arXiv:1705.02364).
  If more than two inputs are provided, the extra inputs are assumed to be extra
  "right" sentences, and the output will be the stacked pair representations
  of the left sentence together with all right sentences. This is more efficient
  than separately computing all these pair representations, because the left
  sentence will not need to be re-embedded multiple times.
class_docstr_tok: ["Wrapper","representation","for","a","pair","of","inputs",".","Takes","a","tuple","of","inputs",":","the","left","sentence",",","and","the","right","sentence","(","s",")",".","Returns","a","representation","of","the","pair","of","sentences",",","either","as","a","concatenation","of","the","two","sentence","embeddings","or","as","a","``","siamese","''","representation","which","also","includes","their","difference","and","elementwise","product","(","arXiv:1705.02364",")",".","If","more","than","two","inputs","are","provided",",","the","extra","inputs","are","assumed","to","be","extra","''","right","''","sentences",",","and","the","output","will","be","the","stacked","pair","representations","of","the","left","sentence","together","with","all","right","sentences",".","This","is","more","efficient","than","separately","computing","all","these","pair","representations",",","because","the","left","sentence","will","not","need","to","be","re-embedded","multiple","times","."]
code: def _represent(
      rep: RepresentationBase, embs: torch.Tensor, lens: torch.Tensor
  ) -> torch.Tensor:
      representation = rep(embs, lens)
      if isinstance(representation, tuple):
          return representation[0]
      return representation
  
file_path: pytext/pytext/models/representations/pair_rep.py
imports: from typing import Optional, Tuple, Union
  import torch
  import torch.nn
  from pytext.models.module import create_module
  from pytext.utils.usage import log_class_usage
  from .bilstm_doc_attention import BiLSTMDocAttention
  from .docnn import DocNNRepresentation
  from .representation_base import RepresentationBase
label_desc: Use image node_id 2 for calling the PairRepresentation obj's underlying member method code with example usage: obj._represent(rep, embs, lens) and returns: representation, representation