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: stateful_mig_polling.go
    path of file: ./repos/magic-modules/mmv1/third_party/terraform/services/compute
    
    the code of the file until where you have to start completion: package compute

import (
	"fmt"
	"strings"

	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
	"github.com/hashicorp/terraform-provider-google/google/tpgresource"
	transport_tpg "github.com/hashicorp/terraform-provider-google/google/transport"
)

// PerInstanceConfig needs both regular operation polling AND custom polling for deletion which is why this is not generated
func resourceComputePerInstanceConfigPollRead(d *schema.ResourceData, meta interface{}) transport_tpg.PollReadFunc {
	return func() (map[string]interface{}, error) 
    
func resourceComputeRegionPerInstanceConfigInstancePollRead(d *schema.ResourceData, meta interface{}, instanceName string) transport_tpg.PollReadFunc {
	return func() (map[string]interface{}, error) {
		config := meta.(*transport_tpg.Config)
		userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent)
		if err != nil {
			return nil, err
		}

		url, err := tpgresource.ReplaceVars(d, config, "{{ComputeBasePath}}projects/{{project}}/regions/{{region}}/instanceGroupManagers/{{region_instance_group_manager}}/listManagedInstances")
		if err != nil {
			return nil, err
		}

		url, err = transport_tpg.AddQueryParams(url, map[string]string{"filter": fmt.Sprintf("name=%q", instanceName)})
		if err != nil {
			return nil, err
		}

		project, err := tpgresource.GetProject(d, config)
		if err != nil {
			return nil, err
		}
		res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{
			Config:    config,
			Method:    "POST",
			Project:   project,
			RawURL:    url,
			UserAgent: userAgent,
		})
		if err != nil {
			return res, err
		}

		value, ok := res["managedInstances"]
		if !ok || value == nil {
			return nil, nil
		}

		managedInstances, ok := value.([]interface{})
		if !ok {
			return nil, fmt.Errorf("expected list for value managedInstances. Actual value: %v", value)
		}

		if len(managedInstances) == 1 {
			return managedInstances[0].(map[string]interface{}), nil
		}

		return nil, nil
	}
}