class_docstr: Just takes the first vector from a list of vectors (which in a transformer is typically the
  [CLS] token) and returns it.  For BERT, it's recommended to use `BertPooler` instead.
  
  Registered as a `Seq2VecEncoder` with name "cls_pooler".
  
  # Parameters
  
  embedding_dim: `int`
      This isn't needed for any computation that we do, but we sometimes rely on `get_input_dim`
      and `get_output_dim` to check parameter settings, or to instantiate final linear layers.  In
      order to give the right values there, we need to know the embedding dimension.  If you're
      using this with a transformer from the `transformers` library, this can often be found with
      `model.config.hidden_size`, if you're not sure.
  cls_is_last_token: `bool`, optional
      The [CLS] token is the first token for most of the pretrained transformer models.
      For some models such as XLNet, however, it is the last token, and we therefore need to
      select at the end.
code: def __init__(
      self, embedding_dim: int, cls_is_last_token: bool = False
  ):
      super().__init__()
      self._embedding_dim = embedding_dim
      self._cls_is_last_token = cls_is_last_token
  
file_path: allennlp/allennlp/modules/seq2vec_encoders/cls_pooler.py
imports: import torch.nn
  from allennlp.modules.seq2vec_encoders.seq2vec_encoder import Seq2VecEncoder
  from allennlp.nn.util import get_final_encoder_states
label_desc: Use image node_id 1 to create a new ClsPooler object from inherited base classes: Seq2VecEncoder with example: obj = ClsPooler(embedding_dim, cls_is_last_token)