code: def test_default_checkpoint_freq(
      save_mock,
      tmpdir,
      epochs: int,
      val_check_interval: float,
      expected: int,
  ):
      model = BoringModel()
      trainer = Trainer(
          default_root_dir=tmpdir,
          max_epochs=epochs,
          enable_model_summary=False,
          val_check_interval=val_check_interval,
          limit_val_batches=1,
          enable_progress_bar=False,
      )
      trainer.fit(model)
  
      # make sure types are correct
      assert save_mock.call_count == expected
  
file_path: pytorch-lightning/tests/tests_pytorch/checkpointing/test_checkpoint_callback_frequency.py
imports: import os
  from unittest import mock
  import pytest
  import torch
  from lightning.pytorch import Trainer, callbacks
  from lightning.pytorch.demos.boring_classes import BoringModel
  from tests_pytorch.helpers.runif import RunIf
label_desc: Use image node_id 2 for calling a global function with example usage: test_default_checkpoint_freq(save_mock, tmpdir, epochs, val_check_interval, expected) without return types