code: func ResourceProviderFullName(resourceType, explicitProvider string) string {
  	if explicitProvider != "" {
  		// check for an explicit provider name, or return the original
  		parts := strings.SplitAfter(explicitProvider, "provider.")
  		return parts[len(parts)-1]
  	}
  
  	idx := strings.IndexRune(resourceType, '_')
  	if idx == -1 {
  		// If no underscores, the resource name is assumed to be
  		// also the provider name, e.g. if the provider exposes
  		// only a single resource of each type.
  		return resourceType
  	}
  
  	return resourceType[:idx]
  }
docs: // ResourceProviderFullName returns the full (dependable) name of the
  // provider for a hypothetical resource with the given resource type and
  // explicit provider string. If the explicit provider string is empty then
  // the provider name is inferred from the resource type name.