code: function pyprojectTomlToRequirements() {
    if (!this.options.usePoetry || !isPoetryProject(this.servicePath)) {
      return;
    }
  
    this.serverless.cli.log('Generating requirements.txt from pyproject.toml...');
  
    const res = spawnSync(
      'poetry',
      ['export', '--without-hashes', '-f', 'requirements.txt'],
      {
        cwd: this.servicePath
      }
    );
    if (res.error) {
      if (res.error.code === 'ENOENT') {
        throw new Error(
          `poetry not found! Install it according to the poetry docs.`
        );
      }
      throw new Error(res.error);
    }
    if (res.status !== 0) {
      throw new Error(res.stderr);
    }
    fse.ensureDirSync(path.join(this.servicePath, '.serverless'));
    fse.moveSync(
      path.join(this.servicePath, 'requirements.txt'),
      path.join(this.servicePath, '.serverless', 'requirements.txt')
    );
  }
docs: poetry install