class_docstr: Test class for preprocessing tests.
code: def make_class_map_data(self):
      # Create training file
      train_path = train_dir / "test_class_map.jsonlines"
      ids = []
      labels = []
      features = []
      class_names = ["beagle", "cat", "dachsund", "cat"]
      for i in range(1, 101):
          y = class_names[i % 4]
          ex_id = f"{y}{i}"
          # note that f1 and f5 are missing in all instances but f4 is not
          x = {"f2": i + 1, "f3": i + 2, "f4": i + 5}
          ids.append(ex_id)
          labels.append(y)
          features.append(x)
      train_fs = FeatureSet(
          "train_class_map", ids, features=features, labels=labels
      )
      writer = NDJWriter(train_path, train_fs)
      writer.write()
  
      # Create test file
      test_path = test_dir / "test_class_map.jsonlines"
      ids = []
      labels = []
      features = []
      for i in range(1, 51):
          y = class_names[i % 4]
          ex_id = f"{y}{i}"
          # f1 and f5 are not missing in any instances here but f4 is
          x = {"f1": i, "f2": i + 2, "f3": i % 10, "f5": i * 2}
          ids.append(ex_id)
          labels.append(y)
          features.append(x)
      test_fs = FeatureSet(
          "test_class_map", ids, features=features, labels=labels
      )
      writer = NDJWriter(test_path, test_fs)
      writer.write()
  
imports: import json
  import os
  import re
  import unittest
  import numpy
  import scipy.sparse
  from numpy.testing import assert_almost_equal, assert_array_equal
  from sklearn.datasets import make_classification
  from sklearn.feature_extraction import FeatureHasher
  from skll.data import FeatureSet, NDJWriter
  from skll.experiments import run_configuration
  from skll.learner import Learner
  from skll.learner.utils import SelectByMinCount
  from skll.utils.testing import config_dir, fill_in_config_paths, output_dir, test_dir, train_dir, unlink
label_desc: Use image node_id 4 for calling the TestPreprocessing obj's underlying member method code with example usage: obj.make_class_map_data() without return types