def _unpack_ipv4(ip_str):
 if (not ip_str.lower().startswith('0000:0000:0000:0000:0000:ffff:')):
  return None
 return ip_str.rsplit(':', 1)[1]

def _unpack_ipv4 ( ip_str ) : if ( not ip_str . lower ( ) . startswith ( '0000:0000:0000:0000:0000:ffff:' ) ) : return None return ip_str . rsplit ( ':' , 1 ) [ 1 ]
unpack an ipv4 address that was mapped in a compressed ipv6 address .