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: create_dataset.go
    path of file: ./repos/golang-samples/aiplatform/snippets
    
    the code of the file until where you have to start completion: // Copyright 2023 Google LLC
//
// 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/LIC
    
func createDataset(w io.Writer, projectID, location string) error {
	// projectID := "my-project"
	// location := "us-central1"

	apiEndpoint := fmt.Sprintf("%s-aiplatform.googleapis.com:443", location)
	clientOption := option.WithEndpoint(apiEndpoint)

	ctx := context.Background()
	client, err := aiplatform.NewDatasetClient(ctx, clientOption)
	if err != nil {
		return fmt.Errorf("aiplatform.NewDatasetClient: %v", err)
	}
	defer client.Close()

	// Create a new, empty image dataset
	// Vertex AI automatically assigns an ID for the dataset resource
	req := &aiplatformpb.CreateDatasetRequest{
		Parent: fmt.Sprintf("projects/%s/locations/%s", projectID, location),
		Dataset: &aiplatformpb.Dataset{
			DisplayName:       "my-image-dataset",
			MetadataSchemaUri: "gs://google-cloud-aiplatform/schema/dataset/metadata/image_1.0.0.yaml",
		},
	}

	resp, err := client.CreateDataset(ctx, req)
	if err != nil {
		return err
	}

	// Wait for the longrunning operation to complete
	dataset, err := resp.Wait(ctx)
	if err != nil {
		return err
	}

	fmt.Fprintln(w, "Created dataset with resource name:")
	fmt.Fprintf(w, "%s\n", dataset.Name)
	return nil
}