code: def get_preds_from_model(
      df, model, target, column_count, categorical_dummy_column_names
  ):
      """Gets predictions from the stored AutoKeras model."""
      df_to_predict = df.copy()
      for col in ["__mindsdb_row_id", target]:
          if col in df_to_predict.columns.values.tolist():
              df_to_predict = df_to_predict.drop(col, axis=1)
  
      if len(df_to_predict.columns) != column_count:
          raise Exception(
              "All feature columns must be defined in the WHERE clause when making predictions"
          )
      # Get dummies for any categorical columns and then populate the missing ones with zeros
      df_with_dummies = pd.get_dummies(df_to_predict)
      for (
          col
      ) in (
          categorical_dummy_column_names
      ):  # exception handler for empty columns
          if col not in df_with_dummies.columns.values.tolist():
              df_with_dummies[col] = 0
  
      return model.predict(df_with_dummies, verbose=2)
  
file_path: mindsdb/mindsdb/integrations/handlers/autokeras_handler/autokeras_handler.py
imports: import os
  import random
  import string
  from typing import Optional
  import numpy
  import pandas
  import autokeras
  from sklearn import preprocessing
  from tensorflow.keras.models import load_model
  from mindsdb.integrations.libs.base import BaseMLEngine
label_desc: Use image node_id 2 for calling a global function with example usage: get_preds_from_model(df, model, target, column_count, categorical_dummy_column_names) and returns: model