class_docstr: A ``SequenceLabelField`` assigns a categorical label to each element in a
  :class:`~allennlp.data.fields.sequence_field.SequenceField`.
  Because it's a labeling of some other field, we take that field as input here, and we use it to
  determine our padding and other things.
  
  This field will get converted into a list of integer class ids, representing the correct class
  for each element in the sequence.
  
  Parameters
  ----------
  labels : ``Union[List[str], List[int]]``
      A sequence of categorical labels, encoded as strings or integers.  These could be POS tags like [NN,
      JJ, ...], BIO tags like [B-PERS, I-PERS, O, O, ...], or any other categorical tag sequence. If the
      labels are encoded as integers, they will not be indexed using a vocab.
  sequence_field : ``SequenceField``
      A field containing the sequence that this ``SequenceLabelField`` is labeling.  Most often, this is a
      ``TextField``, for tagging individual tokens in a sentence.
  label_namespace : ``str``, optional (default='labels')
      The namespace to use for converting tag strings into integers.  We convert tag strings to
      integers for you, and this parameter tells the ``Vocabulary`` object which mapping from
      strings to integers to use (so that "O" as a tag doesn't get the same id as "O" as a word).
class_docstr_tok: ["A","``","SequenceLabelField","``","assigns","a","categorical","label","to","each","element","in","a",":","class",":","`","~allennlp.data.fields.sequence_field.SequenceField","`",".","Because","it","'s","a","labeling","of","some","other","field",",","we","take","that","field","as","input","here",",","and","we","use","it","to","determine","our","padding","and","other","things",".","This","field","will","get","converted","into","a","list","of","integer","class","ids",",","representing","the","correct","class","for","each","element","in","the","sequence",".","Parameters","--","--","--","--","--","labels",":","``","Union","[","List","[","str","]",",","List","[","int","]","]","``","A","sequence","of","categorical","labels",",","encoded","as","strings","or","integers",".","These","could","be","POS","tags","like","[","NN",",","JJ",",","...","]",",","BIO","tags","like","[","B-PERS",",","I-PERS",",","O",",","O",",","...","]",",","or","any","other","categorical","tag","sequence",".","If","the","labels","are","encoded","as","integers",",","they","will","not","be","indexed","using","a","vocab",".","sequence_field",":","``","SequenceField","``","A","field","containing","the","sequence","that","this","``","SequenceLabelField","``","is","labeling",".","Most","often",",","this","is","a","``","TextField","``",",","for","tagging","individual","tokens","in","a","sentence",".","label_namespace",":","``","str","``",",","optional","(","default='labels","'",")","The","namespace","to","use","for","converting","tag","strings","into","integers",".","We","convert","tag","strings","to","integers","for","you",",","and","this","parameter","tells","the","``","Vocabulary","``","object","which","mapping","from","strings","to","integers","to","use","(","so","that","``","O","''","as","a","tag","does","n't","get","the","same","id","as","``","O","''","as","a","word",")","."]
code: def __str__(self):
      length = self.sequence_field.sequence_length()
      formatted_labels = "".join(
          [
              "\t\t" + labels + "\n"
              for labels in textwrap.wrap(repr(self.labels), 100)
          ]
      )
      return (
          "SequenceLabelField of length {length} with "
          "labels:\n {formatted_labels} \t\tin namespace: '{self._label_namespace}'."
      )
  
file_path: magnitude/pymagnitude/third_party/allennlp/data/fields/sequence_label_field.py
imports: from __future__ import absolute_import
  import logging
  import textwrap
  import torch
  from allennlp.common.checks import ConfigurationError
  from allennlp.common.util import pad_sequence_to_length
  from allennlp.data.fields.field import Field
  from allennlp.data.fields.sequence_field import SequenceField
  from allennlp.data.vocabulary import Vocabulary
label_desc: Use image node_id 8 for calling the SequenceLabelField obj's underlying member method code with example usage: obj.__str__() and returns: str