  def Stop(self) -> None:
    """
    Stops the instance.

    Raises:
      errors.InstanceStateChangeError: If the Stop operation is unsuccessful
    """

    logger.info('Stopping instance "{0:s}"'.format(self.name))
    try:
      gce_instance_client = self.GceApi().instances() # pylint: disable=no-member
      request = gce_instance_client.stop(
          project=self.project_id, instance=self.name, zone=self.zone)
      response = request.execute()
      self.BlockOperation(response, zone=self.zone)
    except HttpError as exception:
      raise errors.InstanceStateChangeError(
          'Could not stop instance: {0:s}'.format(str(exception)), __name__)
Stops the instance.

Raises:
errors.InstanceStateChangeError: If the Stop operation is unsuccessful
libcloudforensics/providers/gcp/internal/compute.py