import ipaddress import socket ## # We have to use Jinja2 because while there are ways to *parse* an INI with duplicate keys # (https://stackoverflow.com/a/38286559/733214), there's no way to *write* an INI with them using configparser. # So we use Jinja2 logic. import jinja2