code: def select_features(model):
      r"""Select features with univariate selection.
  
      Parameters
      ----------
      model : alphapy.Model
          Model object with the feature selection specifications.
  
      Returns
      -------
      model : alphapy.Model
          Model object with the revised number of features.
  
      References
      ----------
      You can find more information on univariate feature selection here [UNI]_.
  
      .. [UNI] http://scikit-learn.org/stable/modules/feature_selection.html#univariate-feature-selection
  
      """
  
      logger.info("Feature Selection")
  
      # Extract model data.
  
      X_train = model.X_train
      y_train = model.y_train
  
      # Extract model parameters.
  
      fs_percentage = model.specs["fs_percentage"]
      fs_score_func = model.specs["fs_score_func"]
  
      # Select top features based on percentile.
  
      fs = SelectPercentile(
          score_func=fs_score_func, percentile=fs_percentage
      )
  
      # Perform feature selection and get the support mask
  
      fsfit = fs.fit(X_train, y_train)
      support = fsfit.get_support()
  
      # Record the support vector
  
      logger.info("Saving Univariate Support")
      model.feature_map["uni_support"] = support
  
      # Record the support vector
  
      X_train_new = model.X_train[:, support]
      X_test_new = model.X_test[:, support]
  
      # Count the number of new features.
  
      logger.info("Old Feature Count : %d", X_train.shape[1])
      logger.info("New Feature Count : %d", X_train_new.shape[1])
  
      # Store the reduced features in the model.
  
      model.X_train = X_train_new
      model.X_test = X_test_new
  
      # Mask the feature names and test that feature and name lengths are equal
  
      model.feature_names = list(
          itertools.compress(model.feature_names, support)
      )
      assert X_train_new.shape[1] == len(
          model.feature_names
      ), "Mismatched Features and Names"
  
      # Return the modified model
      return model
  
imports: from alphapy.globals import BSEP, LOFF, NULLTEXT
  from alphapy.globals import PSEP, SSEP, USEP
  from alphapy.globals import Encoders
  from alphapy.globals import ModelType
  from alphapy.globals import Scalers
  from alphapy.variables import Variable
  from alphapy.variables import vparse
  import category_encoders
  from importlib import import_module
  import itertools
  import logging
  import math
  import numpy
  import os
  import pandas
  import re
  from scipy import sparse
  import scipy.stats
  from sklearn.cluster import MiniBatchKMeans
  from sklearn.decomposition import PCA
  from sklearn.feature_extraction.text import TfidfVectorizer
  from sklearn.feature_selection import chi2
  from sklearn.feature_selection import f_classif
  from sklearn.feature_selection import f_regression
  from sklearn.feature_selection import SelectFdr
  from sklearn.feature_selection import SelectFpr
  from sklearn.feature_selection import SelectFwe
  from sklearn.feature_selection import SelectKBest
  from sklearn.feature_selection import SelectPercentile
  from sklearn.feature_selection import VarianceThreshold
  from sklearn.impute import SimpleImputer
  from sklearn.manifold import Isomap
  from sklearn.manifold import TSNE
  from sklearn.preprocessing import MinMaxScaler
  from sklearn.preprocessing import PolynomialFeatures
  from sklearn.preprocessing import StandardScaler
  import sys
label_desc: Use image node_id 17 for calling a global function with example usage: select_features(model) and returns: model