  def Delete(
      self, delete_disks: bool = False, force_delete: bool = False) -> None:
    """Delete an Instance.

    Args:
      delete_disks (bool): force delete all attached disks (ignores the 'Keep
          when instance is deleted' bit).
      force_delete (bool): force delete the instance, even if deletionProtection
          is set to true.

    Raises:
      ResourceDeletionError: If deleteProtection could not be toggled on the
        instance
    """
    if not force_delete and self.deletion_protection:
      logger.warning(
          'This instance is protected against accidental deletion.'
          'To delete it, pass the flag force_delete=True.')
      # We can abort directly since calling the API will fail.
      return

    disks_to_delete = []
    if delete_disks:
      disks_to_delete = [
          disk['source'].split('/')[-1]
          for disk in self.GetValue('disks')
          if disk.get('source', None)
      ]

    gce_instance_client = self.GceApi().instances() # pylint: disable=no-member

    if force_delete and self.deletion_protection:
      logger.info(
          'Deletion protection detected. Disabling due to '
          'force_delete=True')
      try:
        request = gce_instance_client.setDeletionProtection(
            project=self.project_id,
            zone=self.zone,
            resource=self.name,
            deletionProtection=False)
        response = request.execute()
      except HttpError as exception:
        logger.error(
            'Unable to toggle deleteProtection on instance {0:s}: '
            '{1:s}'.format(self.name, str(exception)))
        raise errors.ResourceDeletionError(
            'Unable to toggle deleteProtection on instance {0:s}: {1!s}'.format(
                self.name, exception),
            __name__) from exception
      self.BlockOperation(response, zone=self.zone)

    logger.info(
        self.FormatLogMessage('Deleting Instance: {0:s}'.format(self.name)))
    try:
      request = gce_instance_client.delete(
          project=self.project_id, instance=self.name, zone=self.zone)
      response = request.execute()
    except HttpError as exception:
      if exception.resp.status == 404:
        logger.warning((
            'Can not find resource {0:s}, it might be already '
            'deleted. API call resulted in the following error: '
            '{1:s}').format(self.name, str(exception)))
      else:
        logger.error((
            'While deleting GCE instance {0:s} the following error occurred: '
            '{1:s}').format(self.name, str(exception)))
        raise errors.ResourceDeletionError(
            'Could not delete instance {0:s}: {1!s}'.format(
                self.name, exception),
            __name__) from exception

    self.BlockOperation(response, zone=self.zone)

    for disk_name in disks_to_delete:
      try:
        disk = GoogleCloudCompute(self.project_id).GetDisk(disk_name=disk_name)
        disk.Delete()
      except (errors.ResourceDeletionError, errors.ResourceNotFoundError):
        logger.info(
            self.FormatLogMessage(
                'Could not find disk: {0:s}, skipping'.format(disk_name)))
Delete an Instance.

Args:
delete_disks (bool): force delete all attached disks (ignores the 'Keep
when instance is deleted' bit).
force_delete (bool): force delete the instance, even if deletionProtection
is set to true.

Raises:
ResourceDeletionError: If deleteProtection could not be toggled on the
instance
libcloudforensics/providers/gcp/internal/compute.py