code: def test_string_label_to_class_id(self):
      cls = ["one", "two"]
      self.assertEqual(
          postprocessors.string_label_to_class_id("one", cls), 0
      )
      self.assertEqual(
          postprocessors.string_label_to_class_id("two", cls), 1
      )
      self.assertEqual(
          postprocessors.string_label_to_class_id("foo", cls), -1
      )
      self.assertEqual(
          postprocessors.string_label_to_class_id("foo", cls, 2), 2
      )
  
file_path: text-to-text-transfer-transformer/t5/data/postprocessors_test.py
imports: from absl.testing import absltest
  import numpy
  from t5.data import postprocessors
label_desc: Use image node_id 3 for calling the PostprocessorsTest obj's underlying member method code with example usage: obj.test_string_label_to_class_id() without return types