class_docstr: A `TransformerTextField` is a collection of several tensors that are are a representation of text,
  tokenized and ready to become input to a transformer.
  
  The naming pattern of the tensors follows the pattern that's produced by the huggingface tokenizers,
  and expected by the huggingface transformers.
class_docstr_tok: ["A","`","TransformerTextField","`","is","a","collection","of","several","tensors","that","are","are","a","representation","of","text",",","tokenized","and","ready","to","become","input","to","a","transformer",".","The","naming","pattern","of","the","tensors","follows","the","pattern","that","'s","produced","by","the","huggingface","tokenizers",",","and","expected","by","the","huggingface","transformers","."]
code: def get_padding_lengths(self) -> Dict[str, int]:
      return {
          name: getattr(self, name).shape[-1]
          for name in self.__slots__
          if isinstance(getattr(self, name), torch.Tensor)
      }
  
file_path: allennlp/allennlp/data/fields/transformer_text_field.py
imports: from typing import Dict, Optional, List, Any, Union
  import torch
  import torch.nn.functional
  from allennlp.data.fields.field import Field
  from allennlp.nn import util
label_desc: Use image node_id 2 for calling the TransformerTextField obj's underlying member method code with example usage: obj.get_padding_lengths() and returns: unknown