class_docstr: pooling (e.g. max pooling or self attention)
  followed by optional MLP
class_docstr_tok: ["pooling","(","e.g",".","max","pooling","or","self","attention",")","followed","by","optional","MLP"]
code: def forward(
      self,
      embedded_tokens: torch.Tensor,
      seq_lengths: torch.Tensor = None,
      *args,
  ) -> Any:
      rep = self.dropout(embedded_tokens)
  
      # Attention
      if self.attention:
          rep = self.attention(rep, seq_lengths)
  
      # Non-linear projection
      if self.dense:
          rep = self.dense(rep)
  
      return rep
  
file_path: pytext/pytext/models/representations/pure_doc_attention.py
imports: from typing import Any, Optional, Union
  import torch
  import torch.nn
  from pytext.config import ConfigBase
  from pytext.models.decoders.mlp_decoder import MLPDecoder
  from pytext.models.module import create_module
  from pytext.utils.usage import log_class_usage
  from .pooling import BoundaryPool, MaxPool, MeanPool, NoPool, SelfAttention
  from .representation_base import RepresentationBase
label_desc: Use image node_id 2 for calling the PureDocAttention obj's underlying member method code with example usage: obj.forward(embedded_tokens, seq_lengths) and returns: rep