code: def build_and_compile_cnn_model():
      model = tf.keras.Sequential(
          [
              tf.keras.layers.InputLayer(input_shape=(28, 28)),
              tf.keras.layers.Reshape(target_shape=(28, 28, 1)),
              tf.keras.layers.Conv2D(32, 3, activation="relu"),
              tf.keras.layers.Flatten(),
              tf.keras.layers.Dense(128, activation="relu"),
              tf.keras.layers.Dense(10),
          ]
      )
      model.compile(
          loss=tf.keras.losses.SparseCategoricalCrossentropy(
              from_logits=True
          ),
          optimizer=tf.keras.optimizers.SGD(learning_rate=0.001),
          metrics=["accuracy"],
      )
      return model
  
imports: import json
  import os
  import tensorflow
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: build_and_compile_cnn_model() and returns: model