code: def on_file_changed(self, filepath):
      if filepath not in self._watched_modules:
          LOGGER.error(
              "Received event for non-watched file: %s", filepath
          )
          return
  
      # Workaround:
      # Delete all watched modules so we can guarantee changes to the
      # updated module are reflected on reload.
      #
      # In principle, for reloading a given module, we only need to unload
      # the module itself and all of the modules which import it (directly
      # or indirectly) such that when we exec the application code, the
      # changes are reloaded and reflected in the running application.
      #
      # However, determining all import paths for a given loaded module is
      # non-trivial, and so as a workaround we simply unload all watched
      # modules.
      for wm in self._watched_modules.values():
          if (
              wm.module_name is not None
              and wm.module_name in sys.modules
          ):
              del sys.modules[wm.module_name]
  
      for cb in self._on_file_changed:
          cb(filepath)
  
imports: import collections
  import os
  import sys
  import types
  from typing import Callable, Dict, List, Optional, Set
  from streamlit import config, file_util
  from streamlit.folder_black_list import FolderBlackList
  from streamlit.logger import get_logger
  from streamlit.source_util import get_pages
  from streamlit.watcher.path_watcher import NoOpPathWatcher, get_default_path_watcher_class
label_desc: Use image node_id 4 for calling the LocalSourcesWatcher obj's underlying member method code with example usage: obj.on_file_changed(filepath) without return types