def DeleteInstance(args: 'argparse.Namespace') -> None:
  """Deletes a GCE instance.

  Args:
    args (argparse.Namespace): Arguments from ArgumentParser.

  Raises:
    AttributeError: If no project_id was provided and none was inferred
        from the gcloud environment.
  """

  AssignProjectID(args)

  compute_client = gcp_compute.GoogleCloudCompute(args.project)
  instance = compute_client.GetInstance(instance_name=args.instance_name)
  instance.Delete(delete_disks=args.delete_all_disks,
                  force_delete=args.force_delete)

  print('Instance deleted.')
Deletes a GCE instance.

Args:
args (argparse.Namespace): Arguments from ArgumentParser.

Raises:
AttributeError: If no project_id was provided and none was inferred
from the gcloud environment.
tools/gcp_cli.py