def get_course_blocks(user, starting_block_usage_key, transformers=None, collected_block_structure=None):
 if (not transformers):
  transformers = BlockStructureTransformers(COURSE_BLOCK_ACCESS_TRANSFORMERS)
 transformers.usage_info = CourseUsageInfo(starting_block_usage_key.course_key, user)
 return get_block_structure_manager(starting_block_usage_key.course_key).get_transformed(transformers, starting_block_usage_key, collected_block_structure)

def get_course_blocks ( user , starting_block_usage_key , transformers = None , collected_block_structure = None ) : if ( not transformers ) : transformers = BlockStructureTransformers ( COURSE_BLOCK_ACCESS_TRANSFORMERS ) transformers . usage_info = CourseUsageInfo ( starting_block_usage_key . course_key , user ) return get_block_structure_manager ( starting_block_usage_key . course_key ) . get_transformed ( transformers , starting_block_usage_key , collected_block_structure )
a higher order function implemented on top of the block_structure .