docs: def list_enrollments_courses(self, course_id, grading_period_id=None, include=None, role=None, sis_account_id=None, sis_course_id=None, sis_section_id=None, sis_user_id=None, state=None, type=None, user_id=None):
          """
          List enrollments.
  
          Depending on the URL given, return either (1) all of the enrollments in
          a course, (2) all of the enrollments in a section or (3) all of a user's
          enrollments. This includes student, teacher, TA, and observer enrollments.
          
          If a user has multiple enrollments in a context (e.g. as a teacher
          and a student or in multiple course sections), each enrollment will be
          listed separately.
          
          note: Currently, only an admin user can return other users' enrollments. A
          user can, however, return his/her own enrollments.
          """
          path = {}
          data = {}
          params = {}
  
          # REQUIRED - PATH - course_id
          """ID"""
          path["course_id"] = course_id
  
          # OPTIONAL - type
          """A list of enrollment types to return. Accepted values are
          'StudentEnrollment', 'TeacherEnrollment', 'TaEnrollment',
          'DesignerEnrollment', and 'ObserverEnrollment.' If omitted, all enrollment
          types are returned. This argument is ignored if `role` is given."""
          if type is not None:
              params["type"] = type
  
          # OPTIONAL - role
          """A list of enrollment roles to return. Accepted values include course-level
          roles created by the {api:RoleOverridesController#add_role Add Role API}
          as well as the base enrollment types accepted by the `type` argument above."""
          if role is not None:
              params["role"] = role
  
          # OPTIONAL - state
          """Filter by enrollment state. If omitted, 'active' and 'invited' enrollments
          are returned. When querying a user's enrollments (either via user_id
          argument or via user enrollments endpoint), the following additional
          synthetic states are supported: "current_and_invited"|"current_and_future"|"current_and_concluded""""
          if state is not None:
              self._validate_enum(state, ["active", "invited", "creation_pending", "deleted", "rejected", "completed", "inactive"])
              params["state"] = state
  
          # OPTIONAL - include
          """Array of additional information to include on the enrollment or user records.
          "avatar_url" and "group_ids" will be returned on the user record."""
          if include is not None:
              self._validate_enum(include, ["avatar_url", "group_ids", "locked", "observed_users", "can_be_removed"])
              params["include"] = include
  
          # OPTIONAL - user_id
          """Filter by user_id (only valid for course or section enrollment
          queries). If set to the current user's id, this is a way to
          determine if the user has any enrollments in the course or section,
          independent of whether the user has permission to view other people
          on the roster."""
          if user_id is not None:
              params["user_id"] = user_id
  
          # OPTIONAL - grading_period_id
          """Return grades for the given grading_period.  If this parameter is not
          specified, the returned grades will be for the whole course."""
          if grading_period_id is not None:
              params["grading_period_id"] = grading_period_id
  
          # OPTIONAL - sis_account_id
          """Returns only enrollments for the specified SIS account ID(s). Does not
          look into subaccounts. May pass in array or string."""
          if sis_account_id is not None:
              params["sis_account_id"] = sis_account_id
  
          # OPTIONAL - sis_course_id
          """Returns only enrollments matching the specified SIS course ID(s).
          May pass in array or string."""
          if sis_course_id is not None:
              params["sis_course_id"] = sis_course_id
  
          # OPTIONAL - sis_section_id
          """Returns only section enrollments matching the specified SIS section ID(s).
          May pass in array or string."""
          if sis_section_id is not None:
              params["sis_section_id"] = sis_section_id
  
          # OPTIONAL - sis_user_id
          """Returns only enrollments for the specified SIS user ID(s). May pass in
          array or string."""
          if sis_user_id is not None:
              params["sis_user_id"] = sis_user_id
  
          self.logger.debug("GET /api/v1/courses/{course_id}/enrollments with query params: {params} and form data: {data}".format(params=params, data=data, **path))
          return self.generic_request("GET", "/api/v1/courses/{course_id}/enrollments".format(**path), data=data, params=params, all_pages=True)