code: def test_metric_unavailable(tmp_path):
      test_model_filepath = str(tmp_path / "test_model.h5")
      x, y, model = get_data_and_model()
      monitor = "unknown"
      avg_model_ckpt = AverageModelCheckpoint(
          update_weights=False,
          filepath=test_model_filepath,
          monitor=monitor,
          save_best_only=True,
      )
      model.fit(
          x,
          y,
          epochs=EPOCHS,
          batch_size=BATCH_SIZE,
          validation_data=(x, y),
          callbacks=[avg_model_ckpt],
      )
      assert not os.path.exists(test_model_filepath)
  
file_path: addons/tensorflow_addons/callbacks/tests/avg_model_checkpoint_test.py
imports: import os
  import pytest
  import tensorflow
  from tensorflow import keras
  from tensorflow_addons.callbacks import AverageModelCheckpoint
  from tensorflow_addons.optimizers import MovingAverage
label_desc: Use image node_id 9 for calling a global function with example usage: test_metric_unavailable(tmp_path) without return types