<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def stop(self):
 """ Stops the Dynamips hypervisor process. """


        if self.is_running():
            log.info("Stopping Dynamips process PID={}".format(self._process.pid))
            yield from DynamipsHypervisor.stop(self)
            # give some time for the hypervisor to properly stop.
            # time to delete UNIX NIOs for instance.
            yield from asyncio.sleep(0.01)
            try:
                yield from wait_for_process_termination(self._process, timeout=3)
            except asyncio.TimeoutError:
                if self._process.returncode is None:
                    log.warn("Dynamips process {} is still running... killing it".format(self._process.pid))
                    try:
                        self._process.kill()
                    except OSError as e:
                        log.error("Cannot stop the Dynamips process: {}".format(e))
                    if self._process.returncode is None:
                        log.warn('Dynamips hypervisor with PID={} is still running'.format(self._process.pid))

        if self._stdout_file and os.access(self._stdout_file, os.W_OK):
            try:
                os.remove(self._stdout_file)
            except OSError as e:
                log.warning("could not delete temporary Dynamips log file: {}".format(e))
        self._started = False