def wait_for(self, timeout=None, **kwargs):
        """Wait for a specific matching message or timeout.

        You specify the message by passing name=value keyword arguments to
        this method.  The first message received after this function has been
        called that has all of the given keys with the given values will be
        returned when this function is awaited.

        If no matching message is received within the specified timeout (if
        given), then asyncio.TimeoutError will be raised.

        This function only matches a single message and removes itself once
        the message is seen or the timeout expires.

        Args:
            timeout (float): Optional timeout, defaults to None for no timeout.
            **kwargs: Keys to match in the message with their corresponding values.
                You must pass at least one keyword argument so there is something
                to look for.

        Returns:
            awaitable: The response
        """

        if len(kwargs) == 0:
            raise ArgumentError("You must specify at least one message field to wait on")

        spec = MessageSpec(**kwargs)
        future = self._add_waiter(spec)
        future.add_done_callback(lambda x: self._remove_waiter(spec, future))

        return asyncio.wait_for(future, timeout=timeout)
Wait for a specific matching message or timeout.

        You specify the message by passing name=value keyword arguments to
        this method.  The first message received after this function has been
        called that has all of the given keys with the given values will be
        returned when this function is awaited.

        If no matching message is received within the specified timeout (if
        given), then asyncio.TimeoutError will be raised.

        This function only matches a single message and removes itself once
        the message is seen or the timeout expires.

        Args:
            timeout (float): Optional timeout, defaults to None for no timeout.
            **kwargs: Keys to match in the message with their corresponding values.
                You must pass at least one keyword argument so there is something
                to look for.

        Returns:
            awaitable: The response