class_docstr: A `ListField` is a list of other fields.  You would use this to represent, e.g., a list of
  answer options that are themselves `TextFields`.
  
  This field will get converted into a tensor that has one more mode than the items in the list.
  If this is a list of `TextFields` that have shape (num_words, num_characters), this
  `ListField` will output a tensor of shape (num_sentences, num_words, num_characters).
  
  # Parameters
  
  field_list : `List[Field]`
      A list of `Field` objects to be concatenated into a single input tensor.  All of the
      contained `Field` objects must be of the same type.
class_docstr_tok: ["A","`","ListField","`","is","a","list","of","other","fields",".","You","would","use","this","to","represent",",","e.g.",",","a","list","of","answer","options","that","are","themselves","`","TextFields","`",".","This","field","will","get","converted","into","a","tensor","that","has","one","more","mode","than","the","items","in","the","list",".","If","this","is","a","list","of","`","TextFields","`","that","have","shape","(","num_words",",","num_characters",")",",","this","`","ListField","`","will","output","a","tensor","of","shape","(","num_sentences",",","num_words",",","num_characters",")",".","#","Parameters","field_list",":","`","List","[","Field","]","`","A","list","of","`","Field","`","objects","to","be","concatenated","into","a","single","input","tensor",".","All","of","the","contained","`","Field","`","objects","must","be","of","the","same","type","."]
code: def get_padding_lengths(self) -> Dict[str, int]:
      field_lengths = [
          field.get_padding_lengths() for field in self.field_list
      ]
      padding_lengths = {"num_fields": len(self.field_list)}
  
      # We take the set of all possible padding keys for all fields, rather
      # than just a random key, because it is possible for fields to be empty
      # when we pad ListFields.
      possible_padding_keys = [
          key
          for field_length in field_lengths
          for key in list(field_length.keys())
      ]
  
      for key in set(possible_padding_keys):
          # In order to be able to nest ListFields, we need to scope the padding length keys
          # appropriately, so that nested ListFields don't all use the same "num_fields" key.  So
          # when we construct the dictionary from the list of fields, we add something to the
          # name, and we remove it when padding the list of fields.
          padding_lengths["list_" + key] = max(
              x[key] if key in x else 0 for x in field_lengths
          )
  
      # Set minimum padding length to handle empty list fields.
      for padding_key in padding_lengths:
          padding_lengths[padding_key] = max(
              padding_lengths[padding_key], 1
          )
  
      return padding_lengths
  
file_path: allennlp/allennlp/data/fields/list_field.py
imports: from typing import Dict, List, Iterator, Sequence, Any
  from allennlp.data.fields.field import DataArray, Field
  from allennlp.data.vocabulary import Vocabulary
  from allennlp.data.fields.sequence_field import SequenceField
  from allennlp.common.util import pad_sequence_to_length
label_desc: Use image node_id 7 for calling the ListField obj's underlying member method code with example usage: obj.get_padding_lengths() and returns: padding_lengths