def _nextTag(self):
        """
        Generate protocol-local serial numbers for _ask keys.

        @return: a string that has not yet been used on this connection.
        """
        self._counter += 1
        return (b'%x' % (self._counter,))

        Generate protocol-local serial numbers for _ask keys.

        @return: a string that has not yet been used on this connection.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/protocols/amp.py