def _paths_from_data(paths_data):
 paths = []
 for path_data in paths_data:
  paths.append([PathItem(item['usage_key'], item['display_name']) for item in path_data if (item['usage_key'].block_type != 'course')])
 return [path for path in paths if path]

def _paths_from_data ( paths_data ) : paths = [ ] for path_data in paths_data : paths . append ( [ PathItem ( item [ 'usage_key' ] , item [ 'display_name' ] ) for item in path_data if ( item [ 'usage_key' ] . block_type != 'course' ) ] ) return [ path for path in paths if path ]
construct a list of paths from path data .