code: def assert_ok_model_acc(trainer, key="test_acc", thr=0.5):
      # this model should get 0.80+ acc
      acc = trainer.callback_metrics[key]
      assert (
          acc > thr
      ), f"Model failed to get expected {thr} accuracy. {key} = {acc}"
  
file_path: pytorch-lightning/tests/tests_pytorch/helpers/utils.py
imports: import functools
  import os
  from lightning.pytorch.callbacks import ModelCheckpoint
  from lightning.pytorch.demos.boring_classes import BoringModel
  from lightning.pytorch.loggers import TensorBoardLogger
  from tests_pytorch import _TEMP_PATH
label_desc: Use image node_id 4 for calling a global function with example usage: assert_ok_model_acc(trainer, key, thr) without return types