Adds the sendMessage method to the TeacherNode