def get_prerequisite_courses_display(course_descriptor):
 pre_requisite_courses = []
 if (is_prerequisite_courses_enabled() and course_descriptor.pre_requisite_courses):
  for course_id in course_descriptor.pre_requisite_courses:
   course_key = CourseKey.from_string(course_id)
   required_course_descriptor = modulestore().get_course(course_key)
   prc = {'key': course_key, 'display': get_course_display_string(required_course_descriptor)}
   pre_requisite_courses.append(prc)
 return pre_requisite_courses

def get_prerequisite_courses_display ( course_descriptor ) : pre_requisite_courses = [ ] if ( is_prerequisite_courses_enabled ( ) and course_descriptor . pre_requisite_courses ) : for course_id in course_descriptor . pre_requisite_courses : course_key = CourseKey . from_string ( course_id ) required_course_descriptor = modulestore ( ) . get_course ( course_key ) prc = { 'key' : course_key , 'display' : get_course_display_string ( required_course_descriptor ) } pre_requisite_courses . append ( prc ) return pre_requisite_courses
it would retrieve pre-requisite courses .