def execute(self, command, data={}):
method, uri = command<EOL>try:<EOL><INDENT>path = self._formatter.format_map(uri, data)<EOL>body = self._formatter.get_unused_kwargs()<EOL>url = "<STR_LIT>".format(self._url, path)<EOL>return self._request(method, url, body)<EOL><DEDENT>except KeyError as err:<EOL><INDENT>LOGGER.debug(<EOL>'<STR_LIT>'.format(uri, err))<EOL>raise<EOL><DEDENT>
Format the endpoint url by data and then request the remote server.

        Args:
            command(Command): WebDriver command to be executed.
            data(dict): Data fulfill the uri template and json body.

        Returns:
            A dict represent the json body from server response.

        Raises:
            KeyError: Data cannot fulfill the variable which command needed.
            ConnectionError: Meet network problem (e.g. DNS failure,
                refused connection, etc).
            Timeout: A request times out.
            HTTPError: HTTP request returned an unsuccessful status code.