code: def verify_features(self, X, raw_features_only=False):
      if self.column_descriptions is None:
          print(
              "This feature is not enabled by default. Depending on the shape of the training data, it can add hundreds of KB to the saved file size."
          )
          print(
              "Please pass in `ml_predictor.train(data, verify_features=True)` when training a model, and we will enable this function, at the cost of a potentially larger file size."
          )
          warnings.warn(
              "Please pass verify_features=True when invoking .train() on the ml_predictor instance."
          )
          return None
  
      print(
          "\n\nNow verifying consistency between training features and prediction features"
      )
      if isinstance(X, dict):
          prediction_features = set(X.keys())
      elif isinstance(X, pd.DataFrame):
          prediction_features = set(X.columns)
  
      # If the user passed in categorical features, we will effectively one-hot-encode them ourselves here
      # Note that this assumes we're using the "=" as the separater in DictVectorizer/DataFrameVectorizer
      date_col_names = []
      categorical_col_names = []
      for key, value in self.column_descriptions.items():
          if value == "categorical" and "day_part" not in key:
              try:
                  # This covers the case that the user passes in a value in column_descriptions that is not present in their prediction data
                  column_vals = X[key].unique()
                  for val in column_vals:
                      prediction_features.add(key + "=" + str(val))
  
                  categorical_col_names.append(key)
              except:
                  print(
                      "\nFound a column in your column_descriptions that is not present in your prediction data:"
                  )
                  print(key)
  
          elif "day_part" in key:
              # We have found a date column. Make sure this date column is in our prediction data
              # It is outside the scope of this function to make sure that the same date parts are available in both our training and testing data
              raw_date_col_name = key[: key.index("day_part") - 1]
              date_col_names.append(raw_date_col_name)
  
          elif value == "output":
              try:
                  prediction_features.remove(key)
              except KeyError:
                  pass
  
      # Now that we've added in all the one-hot-encoded categorical columns (name=val1, name=val2), remove the base name from our prediction data
      prediction_features = prediction_features - set(
          categorical_col_names
      )
  
      # Get only the unique raw_date_col_names
      date_col_names = set(date_col_names)
  
      training_features = set(self.training_features)
  
      # Remove all of the transformed date column feature names from our training data
      features_to_remove = []
      for feature in training_features:
          for raw_date_col_name in date_col_names:
              if raw_date_col_name in feature:
                  features_to_remove.append(feature)
      training_features = training_features - set(features_to_remove)
  
      # Make sure the raw_date_col_name is in our training data after we have removed all the transformed feature names
      training_features = training_features | date_col_names
  
      # MVP means ignoring text features
      print_nlp_warning = False
      nlp_example = None
      for feature in training_features:
          if "nlp_" in feature:
              print_nlp_warning = True
              nlp_example = feature
              training_features.remove(feature)
  
      if print_nlp_warning == True:
          print("\n\nWe found an NLP column in the training data")
          print(
              "verify_features() currently does not support checking all of the values within an NLP column, so if the text of your NLP column has dramatically changed, you will have to check that yourself."
          )
          print(
              "Here is one example of an NLP feature in the training data:"
          )
          print(nlp_example)
  
      training_not_prediction = training_features - prediction_features
  
      if raw_features_only == True:
          training_not_prediction = self.remove_categorical_values(
              training_not_prediction
          )
  
      if len(training_not_prediction) > 0:
          print(
              "\n\nHere are the features this model was trained on that were not present in this prediction data:"
          )
          print(sorted(list(training_not_prediction)))
      else:
          print(
              "All of the features this model was trained on are included in the prediction data"
          )
  
      prediction_not_training = prediction_features - training_features
      if raw_features_only == True:
          prediction_not_training = self.remove_categorical_values(
              prediction_not_training
          )
  
      if len(prediction_not_training) > 0:
          # Separate out those values we were told to ignore by column_descriptions
          ignored_features = []
          for feature in prediction_not_training:
              if (
                  self.column_descriptions.get(feature, "False")
                  == "ignore"
              ):
                  ignored_features.append(feature)
          prediction_not_training = prediction_not_training - set(
              ignored_features
          )
  
          print(
              "\n\nHere are the features available in the prediction data that were not part of the training data:"
          )
          print(sorted(list(prediction_not_training)))
  
          if len(ignored_features) > 0:
              print(
                  "\n\nAdditionally, we found features in the prediction data that we were told to ignore in the training data"
              )
              print(sorted(list(ignored_features)))
  
      else:
          print(
              "All of the features in the prediction data were in this model's training data"
          )
  
      print("\n\n")
      return {
          "training_not_prediction": training_not_prediction,
          "prediction_not_training": prediction_not_training,
      }
  
imports: from collections import Iterable
  from copy import deepcopy
  import datetime
  import gc
  import os
  import random
  import warnings
  import numpy
  import pandas
  import scipy
  from sklearn.base import BaseEstimator, TransformerMixin
  from sklearn.model_selection import train_test_split
  from sklearn import __version__
  from auto_ml import utils_models
  from auto_ml.utils_models import get_name_from_model
label_desc: Use image node_id 5 for calling the FinalModelATC obj's underlying member method code with example usage: obj.verify_features(X, raw_features_only) and returns: dict, None