human
Complete the below
def assert_submitted(course, problem_type, choices):

    ''''Assert that choice names given in *choices* are the only
    ones submitted.
    Works for both radio and checkbox problems'
    '''

=====
Can you provide a the Python code you requested?
assistant
#Here is the Python code you requested.
    all_choices = ['choice_0', 'choice_1', 'choice_2', 'choice_3']
    for this_choice in all_choices:
        def submit_problem():
            element = world.css_find(inputfield(course, problem_type, choice=this_choice))
            if (this_choice in choices):
                assert element.checked
            else:
                assert (not element.checked)
        world.retry_on_exception(submit_problem)