def _get_credit_course_requirement_xblocks(course_key):
 requirements = []
 for category in CREDIT_REQUIREMENT_XBLOCK_CATEGORIES:
  requirements.extend([{'namespace': block.get_credit_requirement_namespace(), 'name': block.get_credit_requirement_name(), 'display_name': block.get_credit_requirement_display_name(), 'start_date': block.start, 'criteria': {}} for block in _get_xblocks(course_key, category) if _is_credit_requirement(block)])
 return requirements

def _get_credit_course_requirement_xblocks ( course_key ) : requirements = [ ] for category in CREDIT_REQUIREMENT_XBLOCK_CATEGORIES : requirements . extend ( [ { 'namespace' : block . get_credit_requirement_namespace ( ) , 'name' : block . get_credit_requirement_name ( ) , 'display_name' : block . get_credit_requirement_display_name ( ) , 'start_date' : block . start , 'criteria' : { } } for block in _get_xblocks ( course_key , category ) if _is_credit_requirement ( block ) ] ) return requirements
generate a course structure dictionary for the specified course .