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: utils.go
    path of file: ./repos/flyte/flytepropeller/pkg/compiler/transformers/k8s
    
    the code of the file until where you have to start completion: package k8s

import (
	"math"

	"github.com/golang/protobuf/ptypes"
	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"

	"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core"
	"github.com/flyteorg/flyte/flytepropeller/pkg/apis/flyteworkflow/v1alpha1"
)

func refInt(i int) *int {
	return &i
}

func refStr(s string) *string {
	return &s
}

func computeRetryStrategy(n *core.Node, t *core.TaskTemplate) *v1alpha1.RetryStrategy {
	if n.GetMetadata() != nil && n.GetMetadata().GetRetries() != nil && n.GetMetadata().GetRetries().Retries != 0 {
		return &v1alpha1.RetryStrategy{
			MinAttempts: refInt(int(n.GetMetadata().GetRetries().Retries + 1)),
		}
	}

	if t != nil && t.GetMetadata() != nil && t.GetMetadata().GetRetries() != nil && t.GetMetadata().GetRetries().Retries != 0 {
		return &v1alpha1.RetryStrategy{
			MinAttempts: refInt(int(t.GetMetadata().GetRetries().Retries + 1)),
		}
	}

	return nil
}

func computeDeadline(n *core.Node) (*v1.Duration, error) {
	var deadline *v1.Duration
	if n.GetMetadata() != nil && n.GetMetadata().GetTimeout() != nil {
		duration, err := ptypes.Duration(n.GetMetadata().GetTimeout())
		if err != nil {
			return nil, err
		}
		deadline = &v1.Duration{
			Duration: duration,
		}

    
func StripTypeMetadata(t *core.LiteralType) *core.LiteralType {
	if t == nil {
		return nil
	}

	c := *t
	c.Metadata = nil
	c.Annotation = nil
	// Note that we cannot strip `Structure` from the type because the dynamic node output type is used to validate the
	// interface of the dynamically compiled workflow. `Structure` is used to extend type checking information on
	// different Flyte types and is therefore required to ensure correct type validation.

	switch underlyingType := c.Type.(type) {
	case *core.LiteralType_UnionType:
		variants := make([]*core.LiteralType, 0, len(c.GetUnionType().Variants))
		for _, variant := range c.GetUnionType().Variants {
			variants = append(variants, StripTypeMetadata(variant))
		}

		underlyingType.UnionType.Variants = variants
	case *core.LiteralType_MapValueType:
		underlyingType.MapValueType = StripTypeMetadata(c.GetMapValueType())
	case *core.LiteralType_CollectionType:
		underlyingType.CollectionType = StripTypeMetadata(c.GetCollectionType())
	case *core.LiteralType_StructuredDatasetType:
		columns := make([]*core.StructuredDatasetType_DatasetColumn, 0, len(c.GetStructuredDatasetType().Columns))
		for _, column := range c.GetStructuredDatasetType().Columns {
			columns = append(columns, &core.StructuredDatasetType_DatasetColumn{
				Name:        column.Name,
				LiteralType: StripTypeMetadata(column.LiteralType),
			})
		}

		underlyingType.StructuredDatasetType.Columns = columns
	}

	return &c
}