code: def _get_enrollments_list_page(self, params=None):
          
          req_url = urljoin(self.base_url, self.enrollment_list_url)
          resp = self.requester.get(req_url, params=params)
          resp.raise_for_status()
          resp_json = resp.json()
          results = resp_json['results']
          next_url_str = resp_json.get('next')
          cursor = None
          qstr_cursor = None
          if next_url_str:
              next_url = urlparse(next_url_str)
              qstr = parse_qs(next_url.query)
              qstr_cursor = qstr.get('cursor')
  
          if qstr_cursor and isinstance(qstr_cursor, list):
              cursor = qstr_cursor[0]
  
          return results, cursor
docs: Submit request to retrieve enrollments list.
  
          Args:
              params (dict): Query parameters to use in the request. Valid parameters are:
                  * course_id: Filters the result to course enrollments for the course
                      corresponding to the given course ID. The value must be URL encoded.
                      Optional.
                  * username: username: List of comma-separated usernames. Filters the result to the
                      course enrollments of the given users. Optional.