_createChildOptions(options, context) {
		const getCreateStatsOptions = () => {
			if (!options) {
				options = {};
			}

			const { children: childrenOptions = undefined, ...baseOptions } =
				typeof options === "string"
					? { preset: options }
					: /** @type {StatsOptions} */ (options);

			return { childrenOptions, baseOptions };
		};

		const children = this.stats.map((stat, idx) => {
			if (typeof options === "boolean") {
				return stat.compilation.createStatsOptions(options, context);
			}
			const { childrenOptions, baseOptions } = getCreateStatsOptions();
			const childOptions = Array.isArray(childrenOptions)
				? childrenOptions[idx]
				: childrenOptions;
			return stat.compilation.createStatsOptions(
				{
					...baseOptions,
					...(typeof childOptions === "string"
						? { preset: childOptions }
						: childOptions && typeof childOptions === "object"
							? childOptions
							: undefined)
				},
				context
			);
		});
		return {
			version: children.every(o => o.version),
			hash: children.every(o => o.hash),
			errorsCount: children.every(o => o.errorsCount),
			warningsCount: children.every(o => o.warningsCount),
			errors: children.every(o => o.errors),
			warnings: children.every(o => o.warnings),
			children
		};
	}
@param {string | boolean | StatsOptions | undefined} options stats options
@param {CreateStatsOptionsContext} context context
@returns {ChildOptions} context context