def _initialize(self, worker_id):
    if getattr(self, '_initialized', False):
        return
    self._initialized = True
    if (self.name is None):
        self.name = self.__class__.__name__
    self.worker_id = worker_id
    self.pid = os.getpid()
    self._signal_lock = threading.Lock()
    self._on_reload_internal_hook = self._noop_hook
def _initialize(self, worker_id):
    if getattr(self, '_initialized', False):
        return
    self._initialized = True
    if (self.name is None):
        self.name = self.__class__.__name__
    self.worker_id = worker_id
    self.pid = os.getpid()
    self._signal_lock = threading.Lock()
    self._on_reload_internal_hook = self._noop_hook