code: def test_checkpoint_on_list(self, mock_report, model):
      # This tests `ReportCheckpointCallback` when `checkpoint_on` is a `list`. The
      # test simulates each event in `checkpoint_on`, and asserts that a checkpoint
      # is reported for each event.
      callback = ReportCheckpointCallback(
          checkpoint_on=["epoch_end", "train_batch_end"]
      )
      callback.model = model
  
      callback.on_train_batch_end(0, {"loss": 0})
      callback.on_epoch_end(0, {"loss": 0})
  
      assert len(ray.train.report.call_args_list) == 2
      _, first_checkpoint = self.parse_call(
          ray.train.report.call_args_list[0]
      )
      assert first_checkpoint is not None
      _, second_checkpoint = self.parse_call(
          ray.train.report.call_args_list[0]
      )
      assert second_checkpoint is not None
  
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 4 for calling the TestReportCheckpointCallback obj's underlying member method code with example usage: obj.test_checkpoint_on_list(mock_report, model) without return types