code: func LoadSchemas(config *configs.Config, state *states.State, components contextComponentFactory) (*Schemas, error) {
  	schemas := &Schemas{
  		Providers:    map[string]*ProviderSchema{},
  		Provisioners: map[string]*configschema.Block{},
  	}
  	var diags tfdiags.Diagnostics
  
  	newDiags := loadProviderSchemas(schemas.Providers, config, state, components)
  	diags = diags.Append(newDiags)
  	newDiags = loadProvisionerSchemas(schemas.Provisioners, config, components)
  	diags = diags.Append(newDiags)
  
  	return schemas, diags.Err()
  }
docs: // LoadSchemas searches the given configuration, state  and plan (any of which
  // may be nil) for constructs that have an associated schema, requests the
  // necessary schemas from the given component factory (which must _not_ be nil),
  // and returns a single object representing all of the necessary schemas.
  //
  // If an error is returned, it may be a wrapped tfdiags.Diagnostics describing
  // errors across multiple separate objects. Errors here will usually indicate
  // either misbehavior on the part of one of the providers or of the provider
  // protocol itself. When returned with errors, the returned schemas object is
  // still valid but may be incomplete.