docs: def get_student_current_grades(self, username, course_ids=None):
          """
          Returns a CurrentGradesByUser object with the user current grades.
  
          Args:
              username (str): an edx user's username
              course_ids (list): a list of edX course ids.
  
          Returns:
              CurrentGradesByUser: object representing the student current grades
          """
          # if no course ids are provided, let's get the user enrollments
          if course_ids is None:
              enrollments_client = CourseEnrollments(self.requester, self.base_url)
              enrollments = enrollments_client.get_student_enrollments()
              course_ids = list(enrollments.get_enrolled_course_ids())
  
          all_current_grades = []
          for course_id in course_ids:
              try:
                  all_current_grades.append(self.get_student_current_grade(username, course_id))
              except HTTPError as error:
                  if error.response.status_code >= 500:
                      raise
  
          return CurrentGradesByUser(all_current_grades)