input: Write a python function to sort a list of student records by their marks.
  assert sort_by_marks([('Alice', 24, 89), ('Bob', 22, 75), ('Charlie', 23, 95)]) == [('Charlie', 23, 95), ('Alice', 24, 89), ('Bob', 22, 75)]
  assert sort_by_marks([('Dave', 21, 60), ('Eve', 22, 85), ('Frank', 24, 80)]) == [('Eve', 22, 85), ('Frank', 24, 80), ('Dave', 21, 60)]
  assert sort_by_marks([('Grace', 23, 90), ('Heidi', 24, 70), ('Ivan', 22, 100)]) == [('Ivan', 22, 100), ('Grace', 23, 90), ('Heidi', 24, 70)]
output: def sort_by_marks(records):
      return sorted(records, key=lambda x: x[2], reverse=True)