getLevelStatusMap = (sessions) => {
  const levelStatusMap = {}
  for (const session of sessions) {
    const levelOriginal = (session.level || session.get('level') || {}).original
    const sessionState = session.state || session.get('state') || {}
    const capstoneStage = sessionState.capstoneStage // current capstone stage (undefined if user is on stage 1)
    const isLevelAreadyComplete = levelOriginal && (levelStatusMap[levelOriginal] === 'complete' || (capstoneStage && levelStatusMap[levelOriginal] === capstoneStage - 1))
    if (!isLevelAreadyComplete) { // Don't overwrite a complete session with an incomplete one
      if (capstoneStage && capstoneStage > 1) {
        levelStatusMap[levelOriginal] = capstoneStage - 1 // for levels played in stages (capstone levels), levelStatusMap = last completed stage
      } else if (sessionState.complete) {
        levelStatusMap[levelOriginal] = 'complete'
      } else {
        levelStatusMap[levelOriginal] = 'started' // for levels played in stages (capstone levels) as well as normal levels
      }
    }
  }
  return levelStatusMap
}
Creates a level status map using the list of level session objects.
@param {Object[]} sessions - The list of level session objects.
@returns {Object} - Object with key as the level original id, and value = complete/started/capstone stage last 'completed'.