Write the value on the open file.
value
Must be a supported type.
file
Must be a writeable binary file.
version
Indicates the data format that dump should use.
allow_code
Allow to write code objects.
If the value has (or contains an object that has) an unsupported type, a
ValueError exception is raised - but garbage data will also be written
to the file. The object will not be properly read back by load().