class_docstr: Unit tests for the nearest neighbors builder class.
code: def test_builder_training_input(self):
      builder = self.create_builder(default_class_label="default")
      self.assertIsNotNone(builder)
      self.assertTrue(
          builder.spec.kNearestNeighborsClassifier.HasField(
              "stringClassLabels"
          )
      )
  
      self.assertEqual(
          builder.spec.description.trainingInput[0].name, "input"
      )
      self.assertEqual(
          builder.spec.description.trainingInput[0].type.WhichOneof(
              "Type"
          ),
          "multiArrayType",
      )
      self.assertEqual(
          builder.spec.description.trainingInput[1].name, "output"
      )
      self.assertEqual(
          builder.spec.description.trainingInput[1].type.WhichOneof(
              "Type"
          ),
          "stringType",
      )
  
imports: import os
  import shutil
  from coremltools.models.utils import _is_macos
  import unittest
  from coremltools.models import MLModel
  from coremltools.models.nearest_neighbors import KNearestNeighborsClassifierBuilder
  from coremltools._deps import _HAS_SKLEARN
label_desc: Use image node_id 5 for calling the NearestNeighborsBuilderTest obj's underlying member method code with example usage: obj.test_builder_training_input() without return types