code: def get_scores(course_id, student_id):
      
      try:
          score_summaries = ScoreSummary.objects.filter(
              student_item__course_id=course_id,
              student_item__student_id=student_id,
          ).select_related('latest', 'latest__submission', 'student_item')
      except DatabaseError:
          msg = u"Could not fetch scores for course {}, student {}".format(
              course_id, student_id
          )
          logger.exception(msg)
          raise SubmissionInternalError(msg)
      scores = {
          summary.student_item.item_id: UnannotatedScoreSerializer(summary.latest).data
          for summary in score_summaries if not summary.latest.is_hidden()
      }
      return scores
docs: Return a dict mapping item_ids to scores.
  
      Scores are represented by serialized Score objects in JSON-like dict
      format.
  
      This method would be used by an LMS to find all the scores for a given
      student in a given course.
  
      Scores that are "hidden" (because they have points earned set to zero)
      are excluded from the results.
  
      Args:
          course_id (str): Course ID, used to do a lookup on the `StudentItem`.
          student_id (str): Student ID, used to do a lookup on the `StudentItem`.
  
      Returns:
          dict: The keys are `item_id`s (`str`) and the values are tuples of
          `(points_earned, points_possible)`. All points are integer values and
          represent the raw, unweighted scores. Submissions does not have any
          concept of weights. If there are no entries matching the `course_id` or
          `student_id`, we simply return an empty dictionary. This is not
          considered an error because there might be many queries for the progress
          page of a person who has never submitted anything.
  
      Raises:
          SubmissionInternalError: An unexpected error occurred while resetting scores.