original_docstring: Return the IPv6 address in a canonical format
docstring: Return the IPv6 address in a canonical format
docstring_tokens: Return the IPv6 address in a canonical format
code: def canonical_ipv6_address_with_version(ip_addr):
      """Return the IPv6 address in a canonical format"""
      ip_addr = socket.inet_ntop(socket.AF_INET6, socket.inet_pton(socket.AF_INET6, ip_addr))
      # V4MAPPED addresses in hybrid notation
      m = re.match(r'^::ffff:([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)$', ip_addr, re.I)
      if m is not None:
          return 4, m.group(1)
      return 6, ip_addr
code_tokens: def canonical_ipv6_address_with_version ( ip_addr ) : ip_addr = socket . inet_ntop ( socket . AF_INET6 , socket . inet_pton ( socket . AF_INET6 , ip_addr ) ) m = re . match ( r'^::ffff:([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)$' , ip_addr , re . I ) if m is not None : return 4 , m . group ( 1 ) return 6 , ip_addr
short_docstring: Return the IPv6 address in a canonical format
short_docstring_tokens: Return the IPv6 address in a canonical format
comment: """Return the IPv6 address in a canonical format"""$SEP$# V4MAPPED addresses in hybrid notation