def StartAnalysisVm(
    project: str,
    vm_name: str,
    zone: str,
    boot_disk_size: int = 10,
    boot_disk_type: str = 'pd-standard',
    cpu_cores: int = 4,
    attach_disks: Optional[List[str]] = None,
    image_project: str = 'ubuntu-os-cloud',
    image_family: str = 'ubuntu-2204-lts'
) -> Tuple['compute.GoogleComputeInstance', bool]:
  """Start a virtual machine for analysis purposes.

  Args:
    project: Project id for virtual machine.
    vm_name: The name of the virtual machine.
    zone: Zone for the virtual machine.
    boot_disk_size: The size of the analysis VM boot disk (in GB).
    boot_disk_type: URL of the disk type resource describing
        which disk type to use to create the disk. Use pd-standard for a
        standard disk and pd-ssd for a SSD disk.
    cpu_cores: The number of CPU cores to create the machine with.
    attach_disks: List of disk names to attach. Default
        behaviour is to search in zonal disks then regional disks, when using
        regional disks CreateInstanceFromArguments from GoogleCloudCompute is
        recommended to avoid name colisions with zonal disks.
    image_project: Name of the project where the analysis VM
        image is hosted.
    image_family: Name of the image to use to create the
        analysis VM.

  Returns:
    A tuple with a virtual machine object
        and a boolean indicating if the virtual machine was created or not.
  """

  proj = gcp_project.GoogleCloudProject(project, default_zone=zone)
  logger.info('Starting analysis VM {0:s}'.format(vm_name))
  data_disks = []
  for disk_name in (attach_disks or []):
    try:
      disk = proj.compute.GetDisk(disk_name)  # type: Union['compute.GoogleComputeDisk', 'compute.GoogleRegionComputeDisk'] # pylint: disable=line-too-long
    except errors.ResourceNotFoundError:
      disk = proj.compute.GetRegionDisk(disk_name)
    data_disks.append(disk)
  analysis_vm, created = proj.compute.GetOrCreateAnalysisVm(
      vm_name, boot_disk_size, disk_type=boot_disk_type, cpu_cores=cpu_cores,
      image_project=image_project, image_family=image_family,
      data_disks=data_disks, zone=zone)
  logger.info('VM started.')
  return analysis_vm, created
Start a virtual machine for analysis purposes.

Args:
project: Project id for virtual machine.
vm_name: The name of the virtual machine.
zone: Zone for the virtual machine.
boot_disk_size: The size of the analysis VM boot disk (in GB).
boot_disk_type: URL of the disk type resource describing
which disk type to use to create the disk. Use pd-standard for a
standard disk and pd-ssd for a SSD disk.
cpu_cores: The number of CPU cores to create the machine with.
attach_disks: List of disk names to attach. Default
behaviour is to search in zonal disks then regional disks, when using
regional disks CreateInstanceFromArguments from GoogleCloudCompute is
recommended to avoid name colisions with zonal disks.
image_project: Name of the project where the analysis VM
image is hosted.
image_family: Name of the image to use to create the
analysis VM.

Returns:
A tuple with a virtual machine object
and a boolean indicating if the virtual machine was created or not.
libcloudforensics/providers/gcp/forensics.py