code: def inet_ntop(af, addr):
      
      # Use inet_ntop if available
      addr = bytes_encode(addr)
      try:
          return socket.inet_ntop(af, addr)
      except AttributeError:
          try:
              return _INET_NTOP[af](addr)
          except KeyError:
              raise ValueError("unknown address family %d" % af)
docs: Convert an IP address from binary form into text representation.