lib/plugins/aws/invokeLocal/index.js/AwsInvokeLocal/invokeLocalPython
class AwsInvokeLocal:  invokeLocalPython(runtime, handlerPath, handlerName, event) {
    if (process.env.VIRTUAL_ENV) {
      process.env.PATH = `${process.env.VIRTUAL_ENV}/bin:${process.env.PATH}`;
    }
    return new BbPromise(resolve => {
      const python = spawn(runtime,
        [path.join(__dirname, 'invoke.py'), handlerPath, handlerName], { env: process.env });
      python.stdout.on('data', (buf) => this.serverless.cli.consoleLog(buf.toString()));
      python.stderr.on('data', (buf) => this.serverless.cli.consoleLog(buf.toString()));
      python.stdin.write(JSON.stringify(event || {}));
      python.stdin.end();
      python.on('close', () => resolve());
    });
  }