code: def test_smoke(self, tmp_path, model):
      cb = ModelCheckpoint(tmp_path, "test_monitor")
      assert cb is not None
  
      metric = {"test_monitor": AverageMeter()}
      metric["test_monitor"]._avg = 1.0
  
      cb(model, epoch=0, valid_metric=metric)
      assert cb.best_metric == 1.0
      assert (tmp_path / "model_0.pt").is_file()
  
file_path: kornia/test/x/test_x.py
imports: import pytest
  from torch import nn
  from kornia.metrics import AverageMeter
  from kornia.x import EarlyStopping, ModelCheckpoint
  from kornia.x.utils import TrainerState
label_desc: Use image node_id 1 for calling the TestModelCheckpoint obj's underlying member method code with example usage: obj.test_smoke(tmp_path, model) without return types