#NEWLINE# def _decode_addr_key( self , obj_dict ) : #NEWLINE# #INDENT# "\n        Callback function to handle the decoding of the 'Addr' field.\n\n        Serf msgpack 'Addr' as an IPv6 address, and the data needs to be unpack\n        using socket.inet_ntop().\n\n        See: https://github.com/KushalP/serfclient-py/issues/20\n\n        :param obj_dict: A dictionary containing the msgpack map.\n        :return: A dictionary with the correct 'Addr' format.\n        " #NEWLINE# key = b'Addr' #NEWLINE# if ( key in obj_dict ) : #NEWLINE# #INDENT# ip_addr = socket . inet_ntop ( socket . AF_INET6 , obj_dict [ key ] ) #NEWLINE# if ip_addr . startswith ( '::ffff:' ) : #NEWLINE# #INDENT# ip_addr = ip_addr . lstrip ( '::ffff:' ) #NEWLINE# #UNINDENT# obj_dict [ key ] = ip_addr . encode ( 'utf-8' ) #NEWLINE# #UNINDENT# return obj_dict