  def _BlockOperation(self, response: Dict[str, Any]) -> Dict[str, Any]:
    """Block until API operation is finished.

    Args:
      response (Dict): Service Usage API response.

    Returns:
      Dict: Holding the response of a get operation on an API object of type
          Operation.
    """

    operations_api = self.GsuApi().operations() # pylint: disable=no-member

    if response['name'] == self.NOOP_API_RESPONSE:
      return response

    while True:
      request = {'name': response['name']}
      result = common.ExecuteRequest(operations_api, 'get', request)[0]
      if 'done' in result:
        return result
      time.sleep(5)  # Seconds between requests
Block until API operation is finished.

Args:
response (Dict): Service Usage API response.

Returns:
Dict: Holding the response of a get operation on an API object of type
Operation.
libcloudforensics/providers/gcp/internal/serviceusage.py