def METHOD_NAME(self,
               wait: Union[bool, float] = False) -> Optional[QMPMessage]:
    if not wait:
        # wait is False/0: "do not wait, do not except."
        if self._aqmp.events.empty():
            return None
    # If wait is 'True', wait forever. If wait is False/0, the events
    # queue must not be empty; but it still needs some real amount
    # of time to complete.
    timeout = None
    if wait and isinstance(wait, float):
        timeout = wait
    return dict(
        self._sync(
            self._aqmp.events.get(),
            timeout
        )
    )