def write_metadata_im(file, metadata):
 command = ((['convert', file] + list(chain.from_iterable((('-set', k, v) for (k, v) in metadata.items())))) + [file])
 util.command_output(command)
 return True

def write_metadata_im ( file , metadata ) : command = ( ( [ 'convert' , file ] + list ( chain . from_iterable ( ( ( '-set' , k , v ) for ( k , v ) in metadata . items ( ) ) ) ) ) + [ file ] ) util . command_output ( command ) return True
enrich the file metadata with metadata dict thanks to im .