You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: local_value.go
    path of file: ./repos/terraform/internal/stacks/stackconfig
    
    the code of the file until where you have to start completion: // Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1

package stackconfig

import (
	"github.com/hashicorp/hcl/v2"
	"github.com/hashicorp/hcl/v2/hclsyntax"
	"github.com/hashicorp/terraform/internal/tfdiags"
)

// LocalValue is a declaration of a private local value within a particular
// stack configuration. These are visible only within the scope of a particular
// [Stack].
type LocalValue struct {
	Name  string
	Value hcl.Expression

	DeclRange tfdiags.SourceRange
}

func decodeLocalValuesBlock(block *hcl.Block) ([]*LocalValue, tfdiags.Diagnostics) {
	var diags tfdiags.Diagnostics
	
    
func decodeLocalValuesBlock(block *hcl.Block) ([]*LocalValue, tfdiags.Diagnostics) {
	var diags tfdiags.Diagnostics
	attrs, hclDiags := block.Body.JustAttributes()
	diags = diags.Append(hclDiags)
	if len(attrs) == 0 {
		return nil, diags
	}

	ret := make([]*LocalValue, 0, len(attrs))
	for name, attr := range attrs {
		v := &LocalValue{
			Name:      name,
			Value:     attr.Expr,
			DeclRange: tfdiags.SourceRangeFromHCL(attr.NameRange),
		}
		if !hclsyntax.ValidIdentifier(v.Name) {
			diags = diags.Append(invalidNameDiagnostic(
				"Invalid name for local value",
				attr.NameRange,
			))
			continue
		}
		ret = append(ret, v)
	}
	return ret, diags
}