code: def train(self, data, labels):
      self.data = numpy.array(data)
      self.labels = numpy.array(labels)
      self.classes = numpy.unique(self.labels)
      self.ndim = len(self.data[0])
  
file_path: deap/examples/ga/knn.py
imports: import numpy
  import csv
  import operator
  import random
label_desc: Use image node_id 2 for calling the KNN obj's underlying member method code with example usage: obj.train(data, labels) without return types