def METHOD_NAME(tmp_path):
    test_filepath = str(tmp_path / "test_model.{epoch:02d}.h5")
    x, y, model = get_data_and_model()
    save_freq = "epoch"
    avg_model_ckpt = AverageModelCheckpoint(
        update_weights=False, filepath=test_filepath, save_freq=save_freq
    )
    model.fit(
        x,
        y,
        epochs=EPOCHS,
        batch_size=BATCH_SIZE,
        validation_data=(x, y),
        callbacks=[avg_model_ckpt],
    )
    assert os.path.exists(test_filepath.format(epoch=1))
    assert os.path.exists(test_filepath.format(epoch=2))
    assert os.path.exists(test_filepath.format(epoch=3))
    assert os.path.exists(test_filepath.format(epoch=4))
    assert os.path.exists(test_filepath.format(epoch=5))