code: func (b *Remote) PrepareConfig(obj cty.Value) (cty.Value, tfdiags.Diagnostics) {
  	var diags tfdiags.Diagnostics
  
  	if val := obj.GetAttr("organization"); val.IsNull() || val.AsString() == "" {
  		diags = diags.Append(tfdiags.AttributeValue(
  			tfdiags.Error,
  			"Invalid organization value",
  			`The "organization" attribute value must not be empty.`,
  			cty.Path{cty.GetAttrStep{Name: "organization"}},
  		))
  	}
  
  	var name, prefix string
  	if workspaces := obj.GetAttr("workspaces"); !workspaces.IsNull() {
  		if val := workspaces.GetAttr("name"); !val.IsNull() {
  			name = val.AsString()
  		}
  		if val := workspaces.GetAttr("prefix"); !val.IsNull() {
  			prefix = val.AsString()
  		}
  	}
  
  	// Make sure that we have either a workspace name or a prefix.
  	if name == "" && prefix == "" {
  		diags = diags.Append(tfdiags.AttributeValue(
  			tfdiags.Error,
  			"Invalid workspaces configuration",
  			`Either workspace "name" or "prefix" is required.`,
  			cty.Path{cty.GetAttrStep{Name: "workspaces"}},
  		))
  	}
  
  	// Make sure that only one of workspace name or a prefix is configured.
  	if name != "" && prefix != "" {
  		diags = diags.Append(tfdiags.AttributeValue(
  			tfdiags.Error,
  			"Invalid workspaces configuration",
  			`Only one of workspace "name" or "prefix" is allowed.`,
  			cty.Path{cty.GetAttrStep{Name: "workspaces"}},
  		))
  	}
  
  	return obj, diags
  }
docs: // PrepareConfig implements backend.Backend.