code: def create_worker(self, func, interval, *args, **kwargs):
          
  
          thread = StoppableWorkerThread(func, interval, args, kwargs)
          self._workers.append(thread)
  
          if self._started:
              thread.start()
docs: Spawn a worker thread running func.
  
          The worker will be automatically be started when start() is called
          and terminated when stop() is called on this object.
          This must be called only from the main thread, not from a worker thread.
  
          create_worker must not be called after stop() has been called.  If it
          is called before start() is called, the thread is started when start()
          is called, otherwise it is started immediately.
  
          Args:
              func (callable): Either a function that will be called in a loop
                  with a sleep of interval seconds with *args and **kwargs or
                  a generator function that will be called once and expected to
                  yield periodically so that the worker can check if it should
                  be killed.
              interval (float): The time interval between invocations of func.
                  This should not be 0 so that the thread doesn't peg the CPU
                  and should be short enough so that the worker checks if it
                  should be killed in a timely fashion.
              *args: Arguments that are passed to func as positional args
              **kwargs: Arguments that are passed to func as keyword args