code: def write_file(self, filepath, filename=None, directory=None):
          
          arcname = None
          if filename or directory:
              directory = directory.rstrip("/") + "/" if directory else ""
              filename = filename or os.path.basename(filepath)
              arcname = "{}{}".format(directory, filename)
          self._copy_to_zipfile(filepath, arcname=arcname)
          return arcname or filepath
docs: write_file: Write local file to zip
              Args:
                  filepath: (str) location to local file
                  directory: (str) directory in zipfile to write file to (optional)
              Returns: path to file in zip
  
              Note: filepath must be a relative path