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: resources.go
    path of file: ./repos/gardener/pkg/gardenlet/operation/botanist
    
    the code of the file until where you have to start completion: // Copyright 2020 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applica
    
func (b *Botanist) DeployReferencedResources(ctx context.Context) error {
	// Read referenced objects into a slice of unstructured objects
	var unstructuredObjs []*unstructured.Unstructured
	for _, resource := range b.Shoot.GetInfo().Spec.Resources {
		// Read the resource from the Garden cluster
		obj, err := unstructuredutils.GetObjectByRef(ctx, b.GardenClient, &resource.ResourceRef, b.Shoot.GetInfo().Namespace)
		if err != nil {
			return err
		}
		if obj == nil {
			return fmt.Errorf("object not found %v", resource.ResourceRef)
		}

		obj = unstructuredutils.FilterMetadata(obj, "finalizers")

		// Create an unstructured object and append it to the slice
		unstructuredObj := &unstructured.Unstructured{Object: obj}
		unstructuredObj.SetNamespace(b.Shoot.SeedNamespace)
		unstructuredObj.SetName(v1beta1constants.ReferencedResourcesPrefix + unstructuredObj.GetName())

		// Drop unwanted annotations before copying the resource to the seed.
		// All annotations contained in the ManagedResource secret will end up in `ManagedResource.status.resources[].annotations`.
		// We don't want this to happen for the last applied annotation of secrets, which includes the secret data in plain
		// text. This would put sensitive secret data into the ManagedResource object which is probably unencrypted in etcd.
		annotations := unstructuredObj.GetAnnotations()
		delete(annotations, "kubectl.kubernetes.io/last-applied-configuration")
		unstructuredObj.SetAnnotations(annotations)

		unstructuredObjs = append(unstructuredObjs, unstructuredObj)
	}

	// Create managed resource from the slice of unstructured objects
	return managedresources.CreateFromUnstructured(ctx, b.SeedClientSet.Client(), b.Shoot.SeedNamespace, ManagedResourceName,
		false, v1beta1constants.SeedResourceManagerClass, unstructuredObjs, false, nil)
}