code: def test_doc_classification_output_layer(self):
      tensorizer = LabelTensorizer()
      tensorizer.vocab = Vocabulary([SpecialTokens.PAD, "foo", "bar"])
      layer = ClassificationOutputLayer.from_config(
          config=ClassificationOutputLayer.Config(
              loss=CrossEntropyLoss.Config()
          ),
          labels=tensorizer.vocab,
      )
      self.assertEqual(layer.loss_fn.ignore_index, 0)
  
      # use default pad
      tensorizer.vocab = Vocabulary(["foo", "bar"])
      layer = ClassificationOutputLayer.from_config(
          config=ClassificationOutputLayer.Config(
              loss=CrossEntropyLoss.Config()
          ),
          labels=tensorizer.vocab,
      )
      self.assertEqual(layer.loss_fn.ignore_index, -1)
  
imports: import random
  import string
  import sys
  from contextlib import contextmanager
  from io import StringIO
  from typing import Dict, List
  import caffe2.python.hypothesis_test_util
  import hypothesis.strategies
  import numpy
  import torch
  from hypothesis import given, settings
  from pytext.common.constants import SpecialTokens
  from pytext.data.tensorizers import LabelTensorizer
  from pytext.data.utils import Vocabulary
  from pytext.loss import CrossEntropyLoss
  from pytext.models.output_layers.doc_classification_output_layer import ClassificationOutputLayer
  from pytext.models.output_layers.intent_slot_output_layer import IntentSlotOutputLayer
  from pytext.models.output_layers.word_tagging_output_layer import CRFOutputLayer, WordTaggingOutputLayer
label_desc: Use image node_id 1 for calling the OutputLayerTest obj's underlying member method code with example usage: obj.test_doc_classification_output_layer() without return types