code: def test_on_epoch_end_saves_checkpoints_file(
      previous_best: Dict[Text, float],
      current_values: Dict[Text, float],
      improved: bool,
      tmp_path: Path,
      trained_ted: TEDPolicy,
  ):
      model_name = "checkpoint"
      best_model_file = tmp_path / model_name
      assert not best_model_file.exists()
      checkpoint = RasaModelCheckpoint(tmp_path)
      checkpoint.best_metrics_so_far = previous_best
      checkpoint.model = trained_ted.model
      checkpoint.on_epoch_end(1, current_values)
      if improved:
          assert best_model_file.exists()
      else:
          assert not best_model_file.exists()
  
file_path: rasa/tests/utils/tensorflow/test_callback.py
imports: from typing import Dict, Text
  from pathlib import Path
  import pytest
  from _pytest.tmpdir import TempPathFactory
  from rasa.core import training
  from rasa.core.policies.ted_policy import TEDPolicy
  from rasa.engine.graph import ExecutionContext, GraphSchema
  from rasa.engine.storage.local_model_storage import LocalModelStorage
  from rasa.engine.storage.resource import Resource
  from rasa.shared.core.domain import Domain
  from rasa.utils.tensorflow.callback import RasaModelCheckpoint
  from rasa.utils.tensorflow.constants import EPOCHS
label_desc: Use image node_id 3 for calling a global function with example usage: test_on_epoch_end_saves_checkpoints_file(previous_best, current_values, improved, tmp_path, trained_ted) without return types