def METHOD_NAME(aggregator, case_name, service_checks, expect_assertion_error):
    check = AgentCheck()
    for metric_params in service_checks:
        check.service_check(**metric_params)
    try:
        aggregator.assert_no_duplicate_service_checks()
        assertion_error_raised = False
    except AssertionError:
        assertion_error_raised = True
    assert assertion_error_raised == expect_assertion_error