code: def _stop(self, reason=None):
      self._active = False
      if reason is not None:
          log.error(
              "Data input failed due to an error: {}".format(reason)
          )
      if self._shutdown_fun and self._started:
          self._shutdown_fun()
      if self._state:
          self._state.stop()
  
      self._started = False
  
imports: import logging
  import threading
  import atexit
  import time
  import collections
  import traceback
  from abc import ABCMeta, abstractmethod
label_desc: Use image node_id 5 for calling the WorkerCoordinator obj's underlying member method code with example usage: obj._stop(reason) without return types