def quiz_question_to_index(quiz, question):
  """See: https://github.com/fielddaylab/jo_wilder/blob/master/src/scenes/quiz.js

  Each quiz is defined as a seperate dictionary, which means the index of each
  question is specific to its position in that dictionary, rather than its position
  in the overall question list.

  The quiz_indexes dictionary contains the proper indexing for all questions in each 
  of the 5 quizzes.

  Returns:
    The remapped index given a quiz and question number.
  """
  quiz_indexes = {
    0: {0: 0, 1: 1},
    2: {0: 2, 1: 3, 2: 4, 3: 5},
    3: {0: 6, 1: 7, 2: 8, 3: 9},
    4: {0: 10, 1: 11, 2: 12, 3: 13},
    5: {0: 14, 1: 15, 2: 16, 3: 17}
  }

  return quiz_indexes[quiz][question]