def get_tri_from_course(course, courses):
  """
  Given a courses dict, return the trimester of the :param course
  """
  for tri in courses:
    for _course in courses[tri]:
      if course == _course:
        return tri