def METHOD_NAME(
    self,
    request,
    plugin,
    js_config,
    pyramid_request,
    is_gradable,
    is_learner,
    grading_id,
    focused_user,
):
    assignment = factories.Assignment(is_gradable=is_gradable)
    pyramid_request.lti_params["lis_result_sourcedid"] = grading_id
    pyramid_request.params["focused_user"] = focused_user
    if is_learner:
        request.getfixturevalue("user_is_learner")
    plugin.post_launch_assignment_hook(pyramid_request, js_config, assignment)
    if assignment.is_gradable and is_learner and grading_id:
        js_config.add_canvas_speedgrader_settings.assert_called_once_with(
            assignment.document_url
        )
    else:
        js_config.add_canvas_speedgrader_settings.assert_not_called()
    if focused_user:
        js_config.set_focused_user.assert_called_once_with(focused_user)
    else:
        js_config.set_focused_user.assert_not_called()