code: def keras_model(mnist_data):
      # Aim of this model is to test different CNN paramaters, including:
      # The common filter sizes, 3x3 and 5x5
      # A non-power of 2 number of filters
      # Both Average and Max Pooling
      # Both Same and Valid Padding
      x_train, y_train, x_test, y_test = mnist_data
      keras_model = Sequential()
      keras_model.add(
          Conv2D(4, (3, 3), input_shape=(28, 28, 1), padding="same")
      )
      keras_model.add(Activation("relu"))
      keras_model.add(MaxPooling2D())
      keras_model.add(Conv2D(6, (5, 5), padding="valid"))
      keras_model.add(Activation("relu"))
      keras_model.add(AveragePooling2D())
      keras_model.add(Flatten())
      keras_model.add(Dense(10, kernel_initializer="lecun_uniform"))
      keras_model.add(Activation("softmax", name="softmax"))
      keras_model.compile(
          loss="categorical_crossentropy",
          optimizer="adam",
          metrics=["accuracy"],
      )
      keras_model.fit(
          x_train, y_train, batch_size=32, epochs=5, verbose=0
      )
      return keras_model
  
file_path: hls4ml/test/pytest/test_cnn_mnist.py
imports: from pathlib import Path
  import numpy
  import pytest
  from sklearn.metrics import accuracy_score
  from tensorflow.keras.datasets import mnist
  from tensorflow.keras.layers import Activation, AveragePooling2D, Conv2D, Dense, Flatten, MaxPooling2D
  from tensorflow.keras.models import Sequential
  from tensorflow.keras.utils import to_categorical
  import hls4ml
label_desc: Use image node_id 2 for calling a global function with example usage: keras_model(mnist_data) and returns: keras_model