class_docstr: A wrapper class that allows for easy interaction with a Study.
docstr: Obtain the long-running operation.
docstr_tok: ["Obtain","the","long-running","operation","."]
code: def _obtain_long_running_operation(self, resp):
      """Obtain the long-running operation."""
      op_id = resp["name"].split("/")[-1]
      operation_name = "projects/{}/locations/{}/operations/{}".format(
          self.project_id, self.region, op_id
      )
      try:
          get_op = (
              self.service_client.projects()
              .locations()
              .operations()
              .get(name=operation_name)
          )
          operation = get_op.execute()
      except errors.HttpError as e:
          tf.get_logger().info("GetLongRunningOperations failed.")
          raise e
  
      polling_secs = 1
      num_attempts = 0
      while not operation.get("done"):
          sleep_time = self._polling_delay(num_attempts, polling_secs)
          num_attempts += 1
          tf.get_logger().info(
              "Waiting for operation; attempt {}; "
              "sleeping for {} seconds".format(num_attempts, sleep_time)
          )
          time.sleep(sleep_time.total_seconds())
          if num_attempts > 30:  # about 10 minutes
              raise RuntimeError("GetLongRunningOperations timeout.")
          operation = get_op.execute()
      return operation
  
imports: import datetime
  import http
  import json
  import time
  from typing import Any, Dict, List, Mapping, Optional, Text, Union
  from googleapiclient import discovery
  from googleapiclient import errors
  import tensorflow
  from tensorflow_cloud.tuner import vizier_client_interface
  from tensorflow_cloud.tuner import constants
  from tensorflow_cloud.utils import google_api_client
label_desc: Use image node_id 10 for calling the _VizierClient obj's underlying member method code with example usage: obj._obtain_long_running_operation(resp) and returns: operation