class_docstr: Base observer.
class_docstr_tok: ["Base","observer","."]
docstr: Schedules watching a path and calls appropriate methods specified
  in the given event handler in response to file system events.
  
  :param event_handler:
      An event handler instance that has appropriate event handling
      methods which will be called by the observer in response to
      file system events.
  :type event_handler:
      :class:`watchdog.events.FileSystemEventHandler` or a subclass
  :param path:
      Directory path that will be monitored.
  :type path:
      ``str``
  :param recursive:
      ``True`` if events will be emitted for sub-directories
      traversed recursively; ``False`` otherwise.
  :type recursive:
      ``bool``
  :return:
      An :class:`ObservedWatch` object instance representing
      a watch.
docstr_tok: ["Schedules","watching","a","path","and","calls","appropriate","methods","specified","in","the","given","event","handler","in","response","to","file","system","events",".",":","param","event_handler",":","An","event","handler","instance","that","has","appropriate","event","handling","methods","which","will","be","called","by","the","observer","in","response","to","file","system","events",".",":","type","event_handler",":",":","class",":","`","watchdog.events.FileSystemEventHandler","`","or","a","subclass",":","param","path",":","Directory","path","that","will","be","monitored",".",":","type","path",":","``","str","``",":","param","recursive",":","``","True","``","if","events","will","be","emitted","for","sub-directories","traversed","recursively",";","``","False","``","otherwise",".",":","type","recursive",":","``","bool","``",":","return",":","An",":","class",":","`","ObservedWatch","`","object","instance","representing","a","watch","."]
code: def schedule(self, event_handler, path, recursive=False):
      """
      Schedules watching a path and calls appropriate methods specified
      in the given event handler in response to file system events.
  
      :param event_handler:
          An event handler instance that has appropriate event handling
          methods which will be called by the observer in response to
          file system events.
      :type event_handler:
          :class:`watchdog.events.FileSystemEventHandler` or a subclass
      :param path:
          Directory path that will be monitored.
      :type path:
          ``str``
      :param recursive:
          ``True`` if events will be emitted for sub-directories
          traversed recursively; ``False`` otherwise.
      :type recursive:
          ``bool``
      :return:
          An :class:`ObservedWatch` object instance representing
          a watch.
      """
      with self._lock:
          watch = ObservedWatch(path, recursive)
          self._add_handler_for_watch(event_handler, watch)
  
          # If we don't have an emitter for this watch already, create it.
          if self._emitter_for_watch.get(watch) is None:
              emitter = self._emitter_class(
                  event_queue=self.event_queue,
                  watch=watch,
                  timeout=self.timeout,
              )
              self._add_emitter(emitter)
              if self.is_alive():
                  emitter.start()
          self._watches.add(watch)
      return watch
  
imports: from __future__ import with_statement
  import threading
  from wandb_watchdog.utils import BaseThread
  from wandb_watchdog.utils.compat import queue
  from wandb_watchdog.utils.bricks import SkipRepeatsQueue
label_desc: Use image node_id 9 for calling the BaseObserver obj's underlying member method code with example usage: obj.schedule(event_handler, path, recursive) and returns: watch