code: def train(classifier, train_data_filename, save_classifier_filename=None):
      
      file_data = genfromtxt(train_data_filename, delimiter=",")
      train_data, labels = file_data[:, :-1], file_data[:, -1]
      classifier.fit(train_data, labels)
  
      if save_classifier_filename:
          joblib.dump(classifier, save_classifier_filename)
      return classifier
docs: Trains and saves classifier so that it could be easily loaded later.