#NEWLINE# def media_resources( media_list , download = False ) : #NEWLINE# #INDENT# 'List of MetaData objects of type media\n\n    @param media_list - list of MetaData objects of type `media`\n    @param download - boolean, when True downloads media files when\n                      media.data_value is a valid url\n\n    return a list of MetaData objects\n    ' #NEWLINE# data = [ ] #NEWLINE# for media in media_list : #NEWLINE# #INDENT# if ( ( media . data_file . name == '' ) and media_list ) : #NEWLINE# #INDENT# media = create_media ( media ) #NEWLINE# if media : #NEWLINE# #INDENT# data . append ( media ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# data . append ( media ) #NEWLINE# #UNINDENT# #UNINDENT# return data