class_docstr: KNearestNeighborsClassifierBuilder class to construct a CoreML KNearestNeighborsClassifier specification.
  
  Please see the Core ML Nearest Neighbors protobuf message for more information
  on KNearestNeighborsClassifier parameters.
  
  Examples
  --------
  .. sourcecode:: python
  
      from coremltools.models.nearest_neighbors import KNearestNeighborsClassifierBuilder
      from coremltools.models.utils import save_spec
  
      # Create a KNearestNeighborsClassifier model that takes 4-dimensional input data and outputs a string label.
      >>> builder = KNearestNeighborsClassifierBuilder(input_name='input',
      ...                                              output_name='output',
      ...                                              number_of_dimensions=4,
      ...                                              default_class_label='default_label')
  
      # save the spec by the builder
      >>> save_spec(builder.spec, 'knnclassifier.mlmodel')
  
  See Also
  --------
  MLModel, save_spec
docstr: Get the set of allowed values for the numberOfNeighbors parameter.
  :return: set of allowed values or None if the set of allowed values hasn't been populated
docstr_tok: ["Get","the","set","of","allowed","values","for","the","numberOfNeighbors","parameter",".",":","return",":","set","of","allowed","values","or","None","if","the","set","of","allowed","values","has","n't","been","populated"]
code: def number_of_neighbors_allowed_set(self):
      """
      Get the set of allowed values for the numberOfNeighbors parameter.
      :return: set of allowed values or None if the set of allowed values hasn't been populated
      """
      if self.spec.kNearestNeighborsClassifier.numberOfNeighbors.HasField(
          "set"
      ):
          spec_values = (
              self.spec.kNearestNeighborsClassifier.numberOfNeighbors.set.values
          )
          allowed_values = set()
          for v in spec_values:
              allowed_values.add(v)
          return allowed_values
      return None
  
imports: from ...proto import FeatureTypes_pb2
  from ..None import datatypes
  import coremltools
  import numpy
  import six
label_desc: Use image node_id 20 for calling the KNearestNeighborsClassifierBuilder obj's underlying member method code with example usage: obj.number_of_neighbors_allowed_set() and returns: None, allowed_values