code: def test_report_metrics_on_list(self, mock_report, model):
      # This tests `ReportCheckpointCallback` when `report_metrics_on` is a `list`.
      # The test simulates each event in `report_metrics_on`, and asserts that metrics
      # are reported for each event.
      callback = ReportCheckpointCallback(
          report_metrics_on=["epoch_end", "train_batch_end"]
      )
      callback.model = model
  
      callback.on_train_batch_end(0, {"loss": 0})
      callback.on_epoch_end(0, {"loss": 1})
  
      assert len(ray.train.report.call_args_list) == 2
      first_metric, _ = self.parse_call(
          ray.train.report.call_args_list[0]
      )
      assert first_metric == {"loss": 0}
      second_metric, _ = self.parse_call(
          ray.train.report.call_args_list[1]
      )
      assert second_metric == {"loss": 1}
  
imports: from typing import Dict, Tuple
  from unittest.mock import patch
  import os
  import pytest
  import numpy
  import tensorflow
  import ray
  from ray import train
  from ray.air.integrations.keras import ReportCheckpointCallback
  from ray.train.constants import TRAIN_DATASET_KEY
  from ray.train import ScalingConfig
  from ray.train.tensorflow import TensorflowTrainer, TensorflowPredictor, TensorflowCheckpoint
label_desc: Use image node_id 5 for calling the TestReportCheckpointCallback obj's underlying member method code with example usage: obj.test_report_metrics_on_list(mock_report, model) without return types