class_docstr: A ``TokenCharactersEncoder`` takes the output of a
  :class:`~allennlp.data.token_indexers.TokenCharactersIndexer`, which is a tensor of shape
  (batch_size, num_tokens, num_characters), embeds the characters, runs a token-level encoder, and
  returns the result, which is a tensor of shape (batch_size, num_tokens, encoding_dim).  We also
  optionally apply dropout after the token-level encoder.
  
  We take the embedding and encoding modules as input, so this class is itself quite simple.
code: def forward(
      self, token_characters
  ):  # pylint: disable=arguments-differ
      mask = (token_characters != 0).long()
      return self._dropout(
          self._encoder(self._embedding(token_characters), mask)
      )
  
file_path: magnitude/pymagnitude/third_party/allennlp/modules/token_embedders/token_characters_encoder.py
imports: from __future__ import absolute_import
  import torch
  from allennlp.common import Params
  from allennlp.data.vocabulary import Vocabulary
  from allennlp.modules.token_embedders.embedding import Embedding
  from allennlp.modules.seq2vec_encoders.seq2vec_encoder import Seq2VecEncoder
  from allennlp.modules.time_distributed import TimeDistributed
  from allennlp.modules.token_embedders.token_embedder import TokenEmbedder
label_desc: Use image node_id 3 for calling the TokenCharactersEncoder obj's underlying member method code with example usage: obj.forward(token_characters) and returns: self