Write a file into the archive. The contents is 'data', which
may be either a 'str' or a 'bytes' instance; if it is a 'str',
it is encoded as UTF-8 first.
'zinfo_or_arcname' is either a ZipInfo instance or
the name of the file in the archive.
3.6: Calling writestr() on a ZipFile created with mode 'r' or a closed ZipFile will raise a ValueError. Previously, a RuntimeError was raised.
3.14: Now respects the SOURCE_DATE_EPOCH environment variable. If set, it uses this value as the modification timestamp for the file written into the ZIP archive, instead of using the current time.