code: def step(self):
      self.train_loss.reset_states()
      self.train_accuracy.reset_states()
      self.test_loss.reset_states()
      self.test_accuracy.reset_states()
  
      for idx, (images, labels) in enumerate(self.train_ds):
          if (
              idx > MAX_TRAIN_BATCH
          ):  # This is optional and can be removed.
              break
          self.tf_train_step(images, labels)
  
      for test_images, test_labels in self.test_ds:
          self.tf_test_step(test_images, test_labels)
  
      # It is important to return tf.Tensors as numpy objects.
      return {
          "epoch": self.iteration,
          "loss": self.train_loss.result().numpy(),
          "accuracy": self.train_accuracy.result().numpy() * 100,
          "test_loss": self.test_loss.result().numpy(),
          "mean_accuracy": self.test_accuracy.result().numpy() * 100,
      }
  
file_path: ray/python/ray/tune/examples/tf_mnist_example.py
imports: import argparse
  import os
  from filelock import FileLock
  from tensorflow.keras.layers import Dense, Flatten, Conv2D
  from tensorflow.keras import Model
  from tensorflow.keras.datasets.mnist import load_data
  from ray import train, tune
label_desc: Use image node_id 4 for calling the MNISTTrainable obj's underlying member method code with example usage: obj.step() and returns: dict