class_docstr: `LMLSTM` implements a word-level language model that uses LSTMs to
  represent the document.
class_docstr_tok: ["`","LMLSTM","`","implements","a","word-level","language","model","that","uses","LSTMs","to","represent","the","document","."]
code: def __init__(
      self,
      embedding: EmbeddingBase = Config.embedding,
      representation: RepresentationBase = Config.representation,
      decoder: DecoderBase = Config.decoder,
      output_layer: OutputLayerBase = Config.output_layer,
      stateful: bool = Config.stateful,
      exporter: object = ModelExporter,
  ) -> None:
      super().__init__()
      self.embedding = embedding
      self.representation = representation
      self.decoder = decoder
      self.output_layer = output_layer
      self.stateful = stateful
      self.module_list = [embedding, representation, decoder]
      self._states: Optional[Tuple] = None
      self.exporter = exporter
      log_class_usage(__class__)
  
imports: from typing import Dict, List, Optional, Tuple, Union
  import torch
  from pytext.config import ConfigBase
  from pytext.config.module_config import ExporterType
  from pytext.data import CommonMetadata
  from pytext.data.tensorizers import Tensorizer, TokenTensorizer
  from pytext.exporters.custom_exporters import get_exporter
  from pytext.exporters.exporter import ModelExporter
  from pytext.models.decoders import DecoderBase
  from pytext.models.decoders.mlp_decoder import MLPDecoder
  from pytext.models.embeddings import EmbeddingBase
  from pytext.models.embeddings.word_embedding import WordEmbedding
  from pytext.models.model import BaseModel, Model
  from pytext.models.module import create_module
  from pytext.models.output_layers import OutputLayerBase
  from pytext.models.output_layers.lm_output_layer import LMOutputLayer
  from pytext.models.representations.bilstm import BiLSTM
  from pytext.models.representations.deepcnn import DeepCNNRepresentation
  from pytext.models.representations.representation_base import RepresentationBase
  from pytext.utils.usage import log_class_usage
label_desc: Use image node_id 3 to create a new LMLSTM object from inherited base classes: BaseModel with example: obj = LMLSTM(embedding, representation, decoder, output_layer, stateful, exporter)