code: def project_closing(self, project):
          
  
          yield from super().project_closing(project)
          # delete the Dynamips devices corresponding to the project
          tasks = []
          for device in self._devices.values():
              if device.project.id == project.id:
                  tasks.append(asyncio.async(device.delete()))
  
          if tasks:
              done, _ = yield from asyncio.wait(tasks)
              for future in done:
                  try:
                      future.result()
                  except (Exception, GeneratorExit) as e:
                      log.error("Could not delete device {}".format(e), exc_info=1)
docs: Called when a project is about to be closed.
  
          :param project: Project instance