<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def check_correct(state, check, diagnose):
 """Allows feedback from a diagnostic SCT, only if a check SCT fails. Args: state: State instance describing student and solution code. Can be omitted if used with Ex(). check: An sct chain that must succeed. diagnose: An sct chain to run if the check fails. :Example: The SCT below tests whether students query result is correct, before running diagnostic SCTs.. :: Ex().check_correct( check_result(), check_node('SelectStmt') ) """

    feedback = None
    try:
        multi(state, check)
    except TestFail as e:
        feedback = e.feedback

    # todo: let if from except wrap try-except
    #  only once teach uses force_diagnose
    try:
        multi(state, diagnose)
    except TestFail as e:
        if feedback is not None or state.force_diagnose:
            feedback = e.feedback

    if feedback is not None:
        state.report(feedback)

    return state