constructor(config = {}) {
    this.serviceAbsolutePath = config.serviceAbsolutePath

    const supportedRuntimes = flatten(
      runtimeWrappers.map((runtimeWrapper) => runtimeWrapper.versions),
    )

    if (!supportedRuntimes.includes(config.runtime)) {
      throw new ServerlessError(
        `Unsupported runtime: "${config.runtime}"`,
        `DEV_MODE_UNSUPPORTED_RUNTIME`,
        { stack: false },
      )
    }

    this.handler = config.handler
    this.runtime = config.runtime
    this.environment = {
      ...process.env,
      ...(config.environment || {}),
    }
    this.invocationColorFn = config.invocationColorFn
  }
This is the main Local Lambda class that will be used to invoke local lambda functions.
Each instance of this class represents a single lambda function instance that can be invoked.

@class
@param {Object} [config={}] - The configuration object for the Local Lambda.
@param {string} config.handler - The AWS Lambda handler.
@param {string} config.runtime - The AWS Lambda runtime.
@param {Object} [config.environment={}] - An object representing environment variables to set for the local lambda instance in addition to the current process environment.
@param {string} config.serviceAbsolutePath - The absolute path to the service directory.

@property {string} handler - The AWS Lambda handler.
@property {string} runtime - The AWS Lambda runtime.
@property {Object} environment - The local lambda environment variables.
@property {string} serviceAbsolutePath - The absolute path to the service directory.

@example
const config = {
  handler: 'index.handler',
  runtime: 'nodejs20.x',
  environment: { FOO: 'BAR' },
  serviceAbsolutePath: '~/path/to/service'
};

const localLambda = new LocalLambda(config);