code: def is_valid_ipv6 (ip):
      
      # XXX this is not complete: check ipv6 and ipv4 semantics too here
      if not (_ipv6_re.match(ip) or _ipv6_ipv4_re.match(ip) or
              _ipv6_abbr_re.match(ip) or _ipv6_ipv4_abbr_re.match(ip)):
          return False
      return True
docs: Return True if given ip is a valid IPv6 address.