code: func resourceProviderFactories(resolver providers.Resolver, reqd discovery.PluginRequirements) (map[string]providers.Factory, tfdiags.Diagnostics) {
  	var diags tfdiags.Diagnostics
  	ret, errs := resolver.ResolveProviders(reqd)
  	if errs != nil {
  		diags = diags.Append(
  			tfdiags.Sourceless(tfdiags.Error,
  				"Could not satisfy plugin requirements",
  				errPluginInit,
  			),
  		)
  
  		for _, err := range errs {
  			diags = diags.Append(err)
  		}
  
  		return nil, diags
  	}
  
  	return ret, nil
  }
docs: // resourceProviderFactories matches available plugins to the given version
  // requirements to produce a map of compatible provider plugins if possible,
  // or an error if the currently-available plugins are insufficient.
  //
  // This should be called only with configurations that have passed calls
  // to config.Validate(), which ensures that all of the given version
  // constraints are valid. It will panic if any invalid constraints are present.