def METHOD_NAME(x, y, net, loss_summary, accuracy_summary):
    # training=False is only needed if there are layers with different
    # behavior during training versus inference (e.g. Dropout).
    z = net(x)
    loss = tf.keras.losses.sparse_categorical_crossentropy(
        y_true=y, y_pred=z, from_logits=True, axis=-1
    )
    loss = tf.reduce_mean(loss)
    loss_summary(loss)
    accuracy_summary(y, z)
    return