code: def test_keras_sklearn_compatability(data=DATA, hidden_units=32):
      # test pipeline on Sequential API
      model = KerasWrapperSequential(
          [
              tf.keras.layers.Dense(
                  128,
                  input_shape=[data["num_features"]],
                  activation="relu",
              ),
              tf.keras.layers.Dense(data["num_classes"]),
          ],
      )
  
      pipeline = Pipeline([("scale", StandardScaler()), ("net", model)])
      pipeline.fit(data["X"], data["y"])
      preds = pipeline.predict(data["X"])
  
      # test gridsearch on Sequential API
      model = KerasWrapperSequential(
          [
              tf.keras.layers.Dense(
                  hidden_units,
                  input_shape=[data["num_features"]],
                  activation="relu",
              ),
              tf.keras.layers.Dense(data["num_classes"]),
          ],
      )
  
      params = {"batch_size": [32, 64], "epochs": [2, 3]}
      gs = GridSearchCV(
          model,
          params,
          refit=False,
          cv=3,
          verbose=2,
          scoring="accuracy",
          error_score="raise",
      )
      gs.fit(data["X"], data["y"])
  
      # test pipeline on functional API
      def make_model(num_features, num_classes):
          inputs = tf.keras.Input(shape=(num_features,))
          x = tf.keras.layers.Dense(64, activation="relu")(inputs)
          outputs = tf.keras.layers.Dense(num_classes)(x)
          model = tf.keras.Model(
              inputs=inputs, outputs=outputs, name="test_model"
          )
  
          return model
  
      model = KerasWrapperModel(
          make_model,
          model_kwargs={
              "num_features": data["num_features"],
              "num_classes": data["num_classes"],
          },
      )
  
      pipeline = Pipeline([("scale", StandardScaler()), ("net", model)])
      pipeline.fit(data["X"], data["y"])
      preds = pipeline.predict(data["X"])
  
      # test gridsearch on Sequential API
      model = KerasWrapperModel(
          make_model,
          model_kwargs={
              "num_features": data["num_features"],
              "num_classes": data["num_classes"],
          },
      )
  
      params = {"batch_size": [32, 64], "epochs": [2, 3]}
      gs = GridSearchCV(
          model,
          params,
          refit=False,
          cv=3,
          verbose=2,
          scoring="accuracy",
          error_score="raise",
      )
      gs.fit(data["X"], data["y"])
  
imports: import pytest
  import warnings
  import sys
  import os
  import wget
  from copy import deepcopy
  import random
  import numpy
  import tensorflow
  import torch
  import skorch
  from sklearn.pipeline import Pipeline
  from sklearn.preprocessing import StandardScaler
  from sklearn.model_selection import GridSearchCV
  from cleanlab.classification import CleanLearning
  from cleanlab.models.keras import KerasWrapperSequential, KerasWrapperModel
  from cleanlab.internal.util import format_labels
label_desc: Use image node_id 8 for calling a global function with example usage: test_keras_sklearn_compatability(data, hidden_units) and returns: model