code: def inet_to_str(inet):
      
      # First try ipv4 and then ipv6
      try:
          return socket.inet_ntop(socket.AF_INET, inet)
      except ValueError:
          return socket.inet_ntop(socket.AF_INET6, inet)
docs: Convert inet object to a string
  
          Args:
              inet (inet struct): inet network address
          Returns:
              str: Printable/readable IP address