def resource_media_fields(document, resource):
 media_fields = app.config['DOMAIN'][resource]['_media']
 return [field for field in media_fields if (field in document)]

def resource_media_fields ( document , resource ) : media_fields = app . config [ 'DOMAIN' ] [ resource ] [ '_media' ] return [ field for field in media_fields if ( field in document ) ]
returns a list of media fields defined in the resource schema .