  def DetachServiceAccount(self) -> None:
    """
    Detach a service account from the instance

    Raises:
      errors.ServiceAccountRemovalError: if en error occurs while
          detaching the service account
    """

    logger.info(
        'Detaching service account from instance "{0:s}"'.format(self.name))
    try:
      gce_instance_client = self.GceApi().instances() # pylint: disable=no-member
      request = gce_instance_client.setServiceAccount(
          project=self.project_id, instance=self.name, zone=self.zone, body={})
      response = request.execute()
      self.BlockOperation(response, zone=self.zone)
    except HttpError as exception:
      raise errors.ServiceAccountRemovalError(
          'Service account detatchment '
          'failure: {0:s}'.format(str(exception)),
          __name__)
Detach a service account from the instance

Raises:
errors.ServiceAccountRemovalError: if en error occurs while
detaching the service account
libcloudforensics/providers/gcp/internal/compute.py