getInvocationResult = async (childProcessId) => {
  try {
    const filePath = path.join(os.tmpdir(), `sls_${childProcessId}.json`)

    const result = await fs.readFile(filePath, 'utf8')

    // delete the temporary file after reading its contents
    await fs.unlink(filePath)

    return JSON.parse(result)
  } catch (e) {
    return {
      response: null,
      error: { name: 'InternalServerError' },
    }
  }
}
Gets the invocation result from the temporary file created by the runtime wrapper,
then deletes the file for cleanup. The result is parsed from JSON and returned.

@param {*} childProcessId - The ID of the child process that executed the runtime wrapper to construct the unique file name.

@returns {Promise<any>} A promise that resolves with the parsed result from the temporary file.