code: def from_address(text):
      
      try:
          parts = list(dns.ipv6.inet_aton(text).encode('hex_codec'))
          origin = ipv6_reverse_domain
      except Exception:
          parts = ['%d' % ord(byte) for byte in dns.ipv4.inet_aton(text)]
          origin = ipv4_reverse_domain
      parts.reverse()
      return dns.name.from_text('.'.join(parts), origin=origin)
docs: Convert an IPv4 or IPv6 address in textual form into a Name object whose
      value is the reverse-map domain name of the address.
      @param text: an IPv4 or IPv6 address in textual form (e.g. '127.0.0.1',
      '::1')
      @type text: str
      @rtype: dns.name.Name object