human
How to write bytes to a file in Python 3 without knowing the encoding?
assistant
Here is some code to write bytes `bytes_` to a file `filename` in python 3

open('filename', 'wb').write(bytes_)

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.