human
Complete this python program:
def assert_service_discovery(dcos_api_session, app_definition, net_types):
assistant
#Here is the Python program you requested.

    """net_types: List of network types: DNSHost, DNSPortMap, or DNSOverlay
    """
    with dcos_api_session.marathon.deploy_and_cleanup(app_definition):
        service_points = dcos_api_session.marathon.get_app_service_endpoints(app_definition['id'])
        marathon_addrs = get_marathon_addresses_by_service_points(service_points)
        if (DNSHost in net_types):
            assert (marathon_addrs.host == marathon_addrs.container)
        else:
            assert (not frozenset.intersection(marathon_addrs.host, marathon_addrs.container))
        @retrying.retry(wait_fixed=1000, stop_max_delay=(DNS_ENTRY_UPDATE_TIMEOUT * 1000), retry_on_exception=(lambda x: True))
        def _ensure_dns_converged():
            app_name = app_definition['id']
            dns_addrs = get_dns_addresses_by_app_name(app_name)
            asserted = False
            if (len(net_types) == 2):
                if ((DNSOverlay in net_types) and (DNSPortMap in net_types)):
                    assert (marathon_addrs.host == dns_addrs.agent)
                    assert (marathon_addrs.host == dns_addrs.auto)
                    assert (marathon_addrs.container == dns_addrs.container)
                    asserted = True
            if (len(net_types) == 1):
                if (DNSOverlay in net_types):
                    assert (marathon_addrs.host == dns_addrs.agent)
                    assert (marathon_addrs.container == dns_addrs.auto)
                    assert (marathon_addrs.container == dns_addrs.container)
                    asserted = True
                if (DNSPortMap in net_types):
                    assert (marathon_addrs.host == dns_addrs.agent)
                    assert (marathon_addrs.host == dns_addrs.auto)
                    assert (marathon_addrs.container == dns_addrs.container)
                    asserted = True
                if (DNSHost in net_types):
                    assert (marathon_addrs.host == dns_addrs.agent)
                    assert (marathon_addrs.host == dns_addrs.auto)
                    assert (marathon_addrs.host == dns_addrs.container)
                    asserted =...