class_docstr: This class handles iteration events to store the current performance as
  an attribute of the sender (i.e. application).
docstr: Printing iteration message with ``tf.logging`` interface.
  :param _sender:
  :param msg: an iteration message instance
  :return:
docstr_tok: ["Printing","iteration","message","with","``","tf.logging","``","interface",".",":","param","_sender",":",":","param","msg",":","an","iteration","message","instance",":","return",":"]
code: def check_criteria(self, _sender, **msg):
      """
      Printing iteration message with ``tf.logging`` interface.
      :param _sender:
      :param msg: an iteration message instance
      :return:
      """
      msg = msg["iter_msg"]
      if len(_sender.performance_history) == _sender.patience:
          # Value / threshold based methods:
          # Check the latest value of the performance history against a
          # threshold calculated based on the performance history
          msg.should_stop = check_should_stop(
              mode=_sender.mode,
              performance_history=_sender.performance_history,
          )
  
file_path: NiftyNet/niftynet/engine/handler_early_stopping.py
imports: import numpy
  import tensorflow
  from scipy.ndimage import median_filter
  from niftynet.engine.signal import ITER_FINISHED
label_desc: Use image node_id 2 for calling the EarlyStopper obj's underlying member method code with example usage: obj.check_criteria(_sender) without return types