Perform a server capability check.

async def capability_check(self, optional=None, required=None):
        """Perform a server capability check."""

        self._check_receive_loop()
        # If the returned response is an error, self.query will raise an error
        await self.query(
            "version", {"optional": optional or [], "required": required or []}
        )