def _run(self, scanObject, result, depth, args):
        moduleResult = []
        try:
            with tempfile.NamedTemporaryFile(dir=self.TEMP_DIR) as temp_file_input:
                temp_file_input_name = temp_file_input.name
                temp_file_input.write(scanObject.buffer)
                temp_file_input.flush() 
                temp_file_output_name = temp_file_input_name+"_output"
                strCMD = "upx -d "+temp_file_input_name+" -o "+temp_file_output_name
                outputString = pexpect.run(strCMD)
                f = open(temp_file_output_name) #if strCMD failed, this will throw a file not exists exception
                newbuf = f.read()
                f.close()
                os.remove(temp_file_output_name)
                if len(newbuf) > len(scanObject.buffer):
                    moduleResult.append(ModuleObject(buffer=newbuf, externalVars=ExternalVars(filename="e_upx")))
        except (QuitScanException, GlobalScanTimeoutError, GlobalModuleTimeoutError):
            raise
        except:
            pass
        return moduleResult
The core of your laika module. This is how your code will be invoked
dataset/ETHPy150Open lmco/laikaboss/laikaboss/modules/explode_upx.py/EXPLODE_UPX._run