code: def __unregister_services(self):
          
          # Copy the services list, as it will be modified during the process
          with self.__registration_lock:
              registered_services = self.__registered_services.copy()
  
          for registration in registered_services:
              try:
                  registration.unregister()
              except BundleException:
                  # Ignore errors at this level
                  pass
  
          if self.__registered_services:
              _logger.warning("Not all services have been unregistered...")
  
          with self.__registration_lock:
              # Clear the list, just to be clean
              self.__registered_services.clear()
docs: Unregisters all bundle services