def METHOD_NAME(self, py_code, report):
    report.progress_advance()
    if self._version == pvEoa:
        enc = plEncryptedStream.kEncAes
    elif self._version == pvMoul:
        enc = None
    else:
        enc = plEncryptedStream.kEncXtea
    if enc is None:
        stream = hsFileStream(self._version).open(self._filepath, fmCreate)
    else:
        stream = plEncryptedStream(self._version).open(self._filepath, fmCreate, enc)
    try:
        korlib.package_python(stream, py_code)
    finally:
        stream.close()