class_docstr: This class handles iteration events to start/stop samplers' threads.
docstr: Stop the sampler's threads
  
  :param sender: an instance of niftynet.application
  :param _unused_msg:
  :return:
docstr_tok: ["Stop","the","sampler","'s","threads",":","param","sender",":","an","instance","of","niftynet.application",":","param","_unused_msg",":",":","return",":"]
code: def stop_sampler_threads(self, sender, **_unused_msg):
      """
      Stop the sampler's threads
  
      :param sender: an instance of niftynet.application
      :param _unused_msg:
      :return:
      """
      try:
          tf.logging.info("stopping sampling threads")
          for sampler in traverse_nested(sender.get_sampler()):
              if sampler is None:
                  continue
              sampler.close_all()
      except (AttributeError, TypeError):
          pass
  
imports: import tensorflow
  from niftynet.engine.signal import SESS_FINISHED
  from niftynet.utilities.util_common import traverse_nested
label_desc: Use image node_id 3 for calling the SamplerThreading obj's underlying member method code with example usage: obj.stop_sampler_threads(sender) without return types