def global_request(self, kind, data=None, wait=True):
if wait:<EOL><INDENT>self.completion_event = threading.Event()<EOL><DEDENT>m = Message()<EOL>m.add_byte(cMSG_GLOBAL_REQUEST)<EOL>m.add_string(kind)<EOL>m.add_boolean(wait)<EOL>if data is not None:<EOL><INDENT>m.add(*data)<EOL><DEDENT>self._log(DEBUG, '<STR_LIT>'.format(kind))<EOL>self._send_user_message(m)<EOL>if not wait:<EOL><INDENT>return None<EOL><DEDENT>while True:<EOL><INDENT>self.completion_event.wait(<NUM_LIT:0.1>)<EOL>if not self.active:<EOL><INDENT>return None<EOL><DEDENT>if self.completion_event.is_set():<EOL><INDENT>break<EOL><DEDENT><DEDENT>return self.global_response<EOL>
Make a global request to the remote host.  These are normally
extensions to the SSH2 protocol.

:param str kind: name of the request.
:param tuple data:
    an optional tuple containing additional data to attach to the
    request.
:param bool wait:
    ``True`` if this method should not return until a response is
    received; ``False`` otherwise.
:return:
    a `.Message` containing possible additional data if the request was
    successful (or an empty `.Message` if ``wait`` was ``False``);
    ``None`` if the request was denied.