def _bytesToIPv6(bytestring):
        """
        Convert packed 128-bit IPv6 address bytes into a colon-separated ASCII
        bytes representation of that address.

        @param bytestring: 16 octets representing an IPv6 address.
        @type bytestring: L{bytes}

        @return: a dotted-quad notation IPv6 address.
        @rtype: L{bytes}
        """
        hexString = binascii.b2a_hex(bytestring)
        return b':'.join(
            ('%x' % (int(hexString[b:b+4], 16),)).encode('ascii')
            for b in range(0, 32, 4)
        )

        Convert packed 128-bit IPv6 address bytes into a colon-separated ASCII
        bytes representation of that address.

        @param bytestring: 16 octets representing an IPv6 address.
        @type bytestring: L{bytes}

        @return: a dotted-quad notation IPv6 address.
        @rtype: L{bytes}
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/protocols/haproxy/_v2parser.py