def strip_ansi(state):
    """Remove ANSI escape codes from student result."""
    stu_res = _strip_ansi(state.student_result)

    return state.to_child(student_result = stu_res)
Remove ANSI escape codes from student result.