  def _RetryExecuteRequest(self, operation_name: str) -> Dict[str, Any]:
    """Execute GCB operation.get request and retry if error.

    Args:
      operation_name (str): The name of the operation resource,

    Returns:
      Dict: Represents long-running operation that is the result of a network
          API call.

    Raises:
      RuntimeError: If getting the Cloud Build API operation object failed.
    """
    block_retry_max = 10
    service = self.GcbApi()
    request = service.operations().get(name=operation_name) # pylint: disable=no-member
    get_success = False
    for block_retry in range(block_retry_max):
      try:
        response = request.execute()  # type: Dict[str, Any]
        get_success = True
      except googleapiclient.errors.HttpError as error:
        logging.info(
            'build.BlockOperation: Get request to cloudbuild.googleapis.com '
            'failed.\nTry {0:d} of {1:d}. Error: {2!s} '.format(
                block_retry, block_retry_max, error))
      if get_success:
        break
      if block_retry == block_retry_max - 1:
        raise RuntimeError(
            'Failure blocking Cloud Build operation: {0:s}'.format(
                operation_name))
    return response
Execute GCB operation.get request and retry if error.

Args:
operation_name (str): The name of the operation resource,

Returns:
Dict: Represents long-running operation that is the result of a network
API call.

Raises:
RuntimeError: If getting the Cloud Build API operation object failed.
libcloudforensics/providers/gcp/internal/build.py