def METHOD_NAME(user_profile, exercise, **kwargs):
    nonlocal submissions
    sub = Submission.objects.create(exercise=exercise, **kwargs)
    sub.submitters.add(user_profile)
    submissions.setdefault((user_profile.user_id, exercise.id), [0, False])
    submissions[(user_profile.user_id, exercise.id)][0] += 1
    if exercise.category.confirm_the_level and sub.grade >= exercise.points_to_pass:
        if exercise.parent is not None:
            children = exercise.parent.children.all()
        else:
            children = [lo for lo in exercise.course_module.learning_objects.all() if lo.parent is None]
        for c in children:
            if (user_profile.user_id, c.id) in submissions:
                submissions[(user_profile.user_id, c.id)][1] = True
    return (user_profile.user_id, exercise.id, 1)