code: def test_does_model_improve(
      previous_best: Dict[Text, float],
      current_values: Dict[Text, float],
      improved: bool,
      tmpdir: Path,
  ):
      checkpoint = RasaModelCheckpoint(tmpdir)
      checkpoint.best_metrics_so_far = previous_best
      # true iff all values are equal or better and at least one is better
      assert checkpoint._does_model_improve(current_values) == improved
  
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 1 for calling a global function with example usage: test_does_model_improve(previous_best, current_values, improved, tmpdir) without return types