def get_course_enrollment(self, username, course_id):
endpoint = getattr(<EOL>self.client.enrollment,<EOL>'<STR_LIT>'.format(username=username, course_id=course_id)<EOL>)<EOL>try:<EOL><INDENT>result = endpoint.get()<EOL><DEDENT>except HttpNotFoundError:<EOL><INDENT>LOGGER.error(<EOL>'<STR_LIT>',<EOL>username,<EOL>course_id<EOL>)<EOL>return None<EOL><DEDENT>if not result:<EOL><INDENT>LOGGER.info('<STR_LIT>', username, course_id)<EOL>return None<EOL><DEDENT>return result<EOL>
Query the enrollment API to get information about a single course enrollment.

Args:
    username (str): The username by which the user goes on the OpenEdX platform
    course_id (str): The string value of the course's unique identifier

Returns:
    dict: A dictionary containing details of the enrollment, including course details, mode, username, etc.