def do(self, command):
        """
        "Executes" the given command on the virtual device, and returns
        the response.

        :type  command: str
        :param command: The command to be executed.
        :rtype:  str
        :return: The response of the virtual device.
        """
        echo = self.echo and command or ''
        if not self.logged_in:
            return echo + '\n' + self._get_prompt()

        response = self.commands.eval(command)
        if response is None:
            return echo + '\n' + self._get_prompt()
        return echo + response
def do ( self , command ) : echo = self . echo and command or '' if not self . logged_in : return echo + '\n' + self . _get_prompt ( ) response = self . commands . eval ( command ) if response is None : return echo + '\n' + self . _get_prompt ( ) return echo + response
"Executes" the given command on the virtual device, and returns
        the response.

        :type  command: str
        :param command: The command to be executed.
        :rtype:  str
        :return: The response of the virtual device.