docs: def update(self):
          """
          Updates the bundle
          """
          with self._lock:
              # Was it active ?
              restart = self._state == Bundle.ACTIVE
  
              # Send the update event
              self._fire_bundle_event(BundleEvent.UPDATE_BEGIN)
  
              try:
                  # Stop the bundle
                  self.stop()
              except:
                  # Something wrong occurred, notify listeners
                  self._fire_bundle_event(BundleEvent.UPDATE_FAILED)
                  raise
  
              # Change the source file age
              module_stat = None
              module_file = getattr(self.__module, "__file__", None)
              if module_file is not None and os.path.isfile(module_file):
                  try:
                      module_stat = os.stat(module_file)
  
                      # Change modification time to bypass weak time resolution
                      # of the underlying file system
                      os.utime(
                          module_file,
                          (module_stat.st_atime, module_stat.st_mtime + 1),
                      )
                  except OSError:
                      # Can't touch the file
                      _logger.warning(
                          "Failed to update the modification time of '%s'. "
                          "The bundle update might not reflect the latest "
                          "changes.",
                          module_file,
                      )
  
              # Clean up the module constants (otherwise kept by reload)
              # Keep special members (__name__, __file__, ...)
              old_content = self.__module.__dict__.copy()
              for name in list(self.__module.__dict__):
                  if not (name.startswith("__") and name.endswith("__")):
                      del self.__module.__dict__[name]
  
              try:
                  # Reload the module
                  reload_module(self.__module)
              except (ImportError, SyntaxError) as ex:
                  # Exception raised if the file is unreadable
                  _logger.exception("Error updating %s: %s", self.__name, ex)
  
                  # Reset module content
                  self.__module.__dict__.clear()
                  self.__module.__dict__.update(old_content)
  
              if module_stat is not None:
                  try:
                      # Reset times
                      os.utime(
                          module_file,
                          (module_stat.st_atime, module_stat.st_mtime),
                      )
                  except OSError:
                      # Shouldn't occur, since we succeeded before the update
                      _logger.debug(
                          "Failed to reset the modification time of '%s'",
                          module_file,
                      )
  
              if restart:
                  try:
                      # Re-start the bundle
                      self.start()
                  except:
                      # Something wrong occurred, notify listeners
                      self._fire_bundle_event(BundleEvent.UPDATE_FAILED)
                      raise
  
              # Bundle update finished
              self._fire_bundle_event(BundleEvent.UPDATED)