code: def pause_instance(self, instance_id):
          
  
          if not instance_id:
              log.info("Instance to pause has no instance id.")
              return
  
          gce = self._connect()
  
          try:
              request = gce.instances().stop(project=self._project_id,
                                             instance=instance_id,
                                             zone=self._zone)
              operation = self._execute_request(request)
              response = self._wait_until_done(operation)
              self._check_response(response)
              return {"instance_id": instance_id}
          except HttpError as e:
              log.error("Error stopping instance: `%s", e)
              raise InstanceError("Error stopping instance `%s`", e)
docs: Pauses the instance, retaining disk and config.
  
          :param str instance_id: instance identifier
          :raises: `InstanceError` if instance cannot be paused
  
          :return: dict - information needed to restart instance.