The function write_asset_to_file was repeated in almost all the functions of the repository. I moved it into the losslib.py.
write_asset_to_file
losslib.py
\approve @fd @ds