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).
code: def index(self, vocab: Vocabulary):
      if not self._skip_indexing:
          self._indexed_labels = [
              vocab.get_token_index(label, self._label_namespace)  # type: ignore
              for label in self.labels
          ]
  
imports: from typing import Dict, List, Union, Set, Iterator
  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 7 for calling the SequenceLabelField obj's underlying member method code with example usage: obj.index(vocab) without return types