<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 async def _capability_negotiated(self, capab):
 """ Mark capability as negotiated, and end negotiation if we're done. """

        self._capabilities_negotiating.discard(capab)

        if not self._capabilities_requested and not self._capabilities_negotiating:
            await self.rawmsg('CAP', 'END')