function _propagateOptionsToImplicitlyCreatedSchemas(baseSchema, options) {
  for (const { schema } of baseSchema.childSchemas) {
    if (!schema.$implicitlyCreated) {
      continue;
    }
    Object.assign(schema.options, options);
    _propagateOptionsToImplicitlyCreatedSchemas(schema, options);
  }
}
Sets a schema option.

#### Example:

    schema.set('strict'); // 'true' by default
    schema.set('strict', false); // Sets 'strict' to false
    schema.set('strict'); // 'false'

@param {String} key The name of the option to set the value to
@param {Object} [value] The value to set the option to, if not passed, the option will be reset to default
@param {Array<string>} [tags] tags to add to read preference if key === 'read'
@see Schema https://mongoosejs.com/docs/api/schema.html#Schema()
@api public