def _get_fake_enrollment(student_id, course_id):
 for enrollment in _ENROLLMENTS:
  if ((student_id == enrollment['student']) and (course_id == enrollment['course']['course_id'])):
   return enrollment

def _get_fake_enrollment ( student_id , course_id ) : for enrollment in _ENROLLMENTS : if ( ( student_id == enrollment [ 'student' ] ) and ( course_id == enrollment [ 'course' ] [ 'course_id' ] ) ) : return enrollment
get an enrollment from the enrollments array .