code: def test_time_stopping_verbose(capsys, verbose):
      X, y, model = get_data_and_model(0.25)
  
      time_stopping = TimeStopping(1, verbose=verbose)
  
      capsys.readouterr()  # flush the stdout/stderr buffer.
      history = model.fit(
          X, y, epochs=10, verbose=0, callbacks=[time_stopping]
      )
      fit_stdout = capsys.readouterr().out
      nb_epochs_run = len(history.epoch)
      message = "Timed stopping at epoch " + str(nb_epochs_run)
      if verbose:
          assert message in fit_stdout
      else:
          assert message not in fit_stdout
      assert len(history.epoch) <= 4
  
file_path: addons/tensorflow_addons/callbacks/tests/time_stopping_test.py
imports: import time
  import pytest
  import numpy
  import tensorflow
  from tensorflow.keras.models import Sequential
  from tensorflow.keras.layers import Dense
  from tensorflow_addons.callbacks.time_stopping import TimeStopping
label_desc: Use image node_id 4 for calling a global function with example usage: test_time_stopping_verbose(capsys, verbose) without return types