human
I wrote the below code

    if docker_network_bridge:
        (app_definition, test_uuid) = test_helpers.marathon_test_app(container_type=marathon.Container.DOCKER, network=marathon.Network.BRIDGE, container_port=2020, host_port=9080)
    else:
        (app_definition, test_uuid) = test_helpers.marathon_test_app(container_type=marathon.Container.DOCKER)
    app_definition['instances'] = 2
    assert (len(dcos_api_session.slaves) >= 2), 'Test    requires    a    minimum    of    two    agents'
    app_definition['constraints'] = [['hostname', 'UNIQUE']]
    with dcos_api_session.marathon.deploy_and_cleanup(app_definition):
        service_points = dcos_api_session.marathon.get_app_service_endpoints(app_definition['id'])
        @retrying.retry(wait_fixed=1000, stop_max_delay=(DNS_ENTRY_UPDATE_TIMEOUT * 1000), retry_on_result=(lambda ret: (ret is None)), retry_on_exception=(lambda x: False))
        def _pool_for_mesos_dns():
            r = dcos_api_session.get('/mesos_dns/v1/services/_{}._tcp.marathon.mesos'.format(app_definition['id'].lstrip('/')))
            assert (r.status_code == 200)
            r_data = r.json()
            if ((r_data == [{'host': '', 'port': '', 'service': '', 'ip': ''}]) or (len(r_data) < len(service_points))):
                logging.info('Waiting    for    Mesos-DNS    to    update    entries')
                return None
            else:
                logging.info('Mesos-DNS    entries    have    been    updated!')
                return r_data
        try:
            r_data = _pool_for_mesos_dns()
        except retrying.RetryError:
            msg = 'Mesos    DNS    has    failed    to    update    entries    in    {}    seconds.'
            pytest.fail(msg.format(DNS_ENTRY_UPDATE_TIMEOUT))
        marathon_provided_servicepoints = sorted(((x.host, x.port) for x in service_points))
        mesosdns_provided_servicepoints = sorted(((x['ip'], int(x['port'])) for x in r_data))
        assert (marathon_provided_servicepoints == mesosdns_provided_servicepoints)
        payload = {'reflector_ip':...

What's a good function header?

=====
Here's a good function header?
assistant
#Here's a good function header.

def _service_discovery_test(dcos_api_session, docker_network_bridge):