code: def make_classification_data(
      num_examples=100,
      train_test_ratio=0.5,
      num_features=10,
      use_feature_hashing=False,
      feature_bins=4,
      num_labels=2,
      empty_labels=False,
      string_label_list=None,
      feature_prefix="f",
      id_type="string",
      class_weights=None,
      non_negative=False,
      one_string_feature=False,
      num_string_values=4,
      random_state=1234567890,
  ):
      """
      Create dummy classification data for use in various tests.
  
      Parameters
      ----------
      num_examples : int, optional
          Number of examples in the generated data.
          Defaults to 100.
      train_test_ratio : float, optional
          Ratio of train to test data in the generated data.
          Defaults to 0.5.
      num_features : int, optional
          Number of features in each generated example.
          Defaults to 10.
      use_feature_hashing : bool, optional
          Whether to use feature hashing.
          Defaults to ``False``.
      feature_bins : int, optional
          How many hashed feature bins to use, if ``use_feature_hashing``
          is ``True``.
          Defaults to 4.
      num_labels : int, optional
          Number of classes to use.
      empty_labels : bool, optional
          Whether to set the training and test labels to ``None``
          for certain tests.
          Defaults to ``False``.
      string_label_list : List[str], optional
          List of pre-specified string labels.
      feature_prefix : str, optional
          The prefix to use for all the feature names, if any.
          Defaults to "f" (i.e., "f01" et cetera).
      id_type : str, optional
          The data types to use for the generated example IDs.
          One of ["float", "integer", "integer_string", "string"].
          Defaults to "string".
      class_weights : List[float], optional
          The proportion of generated samples for each of the classes.
          If ``None``, use the same number of samples for each class.
          Defaults to ``None``.
      non_negative : bool, optional
          Whether to generate only non-negative features.
          Defaults to ``False``.
      one_string_feature : bool, optional
          Whether to generate one feature with string values in
          the generated data.
          Defaults to ``False``.
      num_string_values : int, optional
          If ``one_string_feature`` is set to ``True``, how many
          possible values to use for that feature.
          Defaults to 4.
      random_state : int, optional
          Random state to use for generating the data.
          Defaults to 123456789.
  
      Returns
      -------
      Tuple
          Tuple containing the generated training featureset and
          the generated test featureset.
  
      """
      # use sklearn's make_classification to generate the data for us
      num_numeric_features = (
          num_features - 1 if one_string_feature else num_features
      )
      X, y = make_classification(
          n_samples=num_examples,
          n_features=num_numeric_features,
          n_informative=num_numeric_features,
          n_redundant=0,
          n_classes=num_labels,
          weights=class_weights,
          random_state=random_state,
      )
  
      if string_label_list:
          assert len(string_label_list) == num_labels
          label_to_string = np.vectorize(lambda n: string_label_list[n])
          y = label_to_string(y)
  
      # if we were told to only generate non-negative features, then
      # we can simply take the absolute values of the generated features
      if non_negative:
          X = abs(X)
  
      # since we want to use SKLL's FeatureSet class, we need to
      # create a list of IDs; we create IDs that either can also
      # be numbers or pure strings
      if id_type == "string":
          ids = [f"EXAMPLE_{n}" for n in range(1, num_examples + 1)]
      elif id_type == "integer_string":
          ids = [f"{n}" for n in range(1, num_examples + 1)]
      elif id_type == "float":
          ids = [float(n) for n in range(1, num_examples + 1)]
      elif id_type == "integer":
          ids = list(range(1, num_examples + 1))
  
      # create a string feature that has four possible values
      # 'a', 'b', 'c' and 'd' and add it to X at the end
      if one_string_feature:
          prng = RandomState(random_state)
          random_indices = prng.random_integers(
              0, num_string_values - 1, num_examples
          )
          possible_values = [
              chr(x) for x in range(97, 97 + num_string_values)
          ]
          string_feature_values = [
              possible_values[i] for i in random_indices
          ]
          string_feature_column = np.array(
              string_feature_values, dtype=object
          ).reshape(100, 1)
          X = np.append(X, string_feature_column, 1)
  
      # create a list of dictionaries as the features
      feature_names = [
          f"{feature_prefix}{n:02d}" for n in range(1, num_features + 1)
      ]
      features = [dict(zip(feature_names, row)) for row in X]
  
      # split everything into training and testing portions
      num_train_examples = int(round(train_test_ratio * num_examples))
      train_features, test_features = (
          features[:num_train_examples],
          features[num_train_examples:],
      )
      train_y, test_y = y[:num_train_examples], y[num_train_examples:]
      train_ids, test_ids = (
          ids[:num_train_examples],
          ids[num_train_examples:],
      )
  
      # are we told to generate empty labels
      train_labels = None if empty_labels else train_y
      test_labels = None if empty_labels else test_y
  
      # create a FeatureHasher if we are asked to use feature hashing
      # with the specified number of feature bins
      vectorizer = (
          FeatureHasher(n_features=feature_bins)
          if use_feature_hashing
          else None
      )
      train_fs = FeatureSet(
          "classification_train",
          train_ids,
          labels=train_labels,
          features=train_features,
          vectorizer=vectorizer,
      )
      if train_test_ratio < 1.0:
          test_fs = FeatureSet(
              "classification_test",
              test_ids,
              labels=test_labels,
              features=test_features,
              vectorizer=vectorizer,
          )
      else:
          test_fs = None
  
      return (train_fs, test_fs)
  
imports: import os
  import re
  from collections import OrderedDict
  from math import floor, log10
  from pathlib import Path
  from typing import Any, Dict, List, Optional, Tuple
  import numpy
  from numpy.random import RandomState
  from sklearn.datasets import fetch_california_housing, load_digits, make_classification, make_regression
  from sklearn.feature_extraction import FeatureHasher
  from sklearn.model_selection import KFold, ShuffleSplit, StratifiedKFold
  from sklearn.utils import shuffle
  from skll.config import _setup_config_parser, fix_json
  from skll.data import FeatureSet, NDJWriter
  from skll.types import PathOrStr
label_desc: Use image node_id 9 for calling a global function with example usage: make_classification_data(num_examples, train_test_ratio, num_features, use_feature_hashing, feature_bins, num_labels, empty_labels, string_label_list, feature_prefix, id_type, class_weights, non_negative, one_string_feature, num_string_values, random_state) and returns: train_fs,  test_fs