class_docstr: This class initialises an application by building a TF graph,
  and maintaining a session. It controls the
  starting/stopping of an application. Applications should be
  implemented by inheriting ``niftynet.application.base_application``
  to be compatible with this driver.
class_docstr_tok: ["This","class","initialises","an","application","by","building","a","TF","graph",",","and","maintaining","a","session",".","It","controls","the","starting\/stopping","of","an","application",".","Applications","should","be","implemented","by","inheriting","``","niftynet.application.base_application","``","to","be","compatible","with","this","driver","."]
docstr: Import event handler modules and create a list of handler instances.
  The event handler instances will be stored with this engine.
  
  :param names: strings of event handlers
  :return:
docstr_tok: ["Import","event","handler","modules","and","create","a","list","of","handler","instances",".","The","event","handler","instances","will","be","stored","with","this","engine",".",":","param","names",":","strings","of","event","handlers",":","return",":"]
code: def load_event_handlers(self, names):
      """
      Import event handler modules and create a list of handler instances.
      The event handler instances will be stored with this engine.
  
      :param names: strings of event handlers
      :return:
      """
      if not names:
          return
      if self._event_handlers:
          # disconnect all handlers (assuming always weak connection)
          for handler in list(self._event_handlers):
              del self._event_handlers[handler]
      self._event_handlers = {}
      for name in set(names):
          the_event_class = EventHandlerFactory.create(name)
          # initialise all registered event handler classes
          engine_config_dict = vars(self)
          key = "{}".format(the_event_class)
          self._event_handlers[key] = the_event_class(
              **engine_config_dict
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import time
  import tensorflow
  from niftynet.engine.application_factory import ApplicationFactory, EventHandlerFactory, IteratorFactory
  from niftynet.engine.application_iteration import IterationMessage
  from niftynet.engine.application_variables import GradientsCollector, OutputsCollector
  from niftynet.engine.signal import TRAIN, ITER_STARTED, ITER_FINISHED, GRAPH_CREATED, SESS_FINISHED, SESS_STARTED
  from niftynet.io.image_sets_partitioner import ImageSetsPartitioner
  from niftynet.io.misc_io import infer_latest_model_file
  from niftynet.utilities.user_parameters_default import DEFAULT_EVENT_HANDLERS, DEFAULT_ITERATION_GENERATOR
  from niftynet.utilities.util_common import set_cuda_device, tf_config, device_string
  from niftynet.utilities.util_common import traverse_nested
label_desc: Use image node_id 5 for calling the ApplicationDriver obj's underlying member method code with example usage: obj.load_event_handlers(names) without return types