class_docstr: Waits for Data Transfer Service run to complete.
  
  .. seealso::
      For more information on how to use this sensor, take a look at the guide:
      :ref:`howto/operator:BigQueryDataTransferServiceTransferRunSensor`
  
  :param expected_statuses: The expected state of the operation.
      See:
      https://cloud.google.com/storage-transfer/docs/reference/rest/v1/transferOperations#Status
  :param run_id: ID of the transfer run.
  :param transfer_config_id: ID of transfer config to be used.
  :param project_id: The BigQuery project id where the transfer configuration should be
      created. If set to None or missing, the default project_id from the Google Cloud connection is used.
  :param retry: A retry object used to retry requests. If `None` is
      specified, requests will not be retried.
  :param request_timeout: The amount of time, in seconds, to wait for the request to
      complete. Note that if retry is specified, the timeout applies to each individual
      attempt.
  :param metadata: Additional metadata that is provided to the method.
  :param impersonation_chain: Optional service account to impersonate using short-term
      credentials, or chained list of accounts required to get the access_token
      of the last account in the list, which will be impersonated in the request.
      If set as a string, the account must grant the originating account
      the Service Account Token Creator IAM role.
      If set as a sequence, the identities from the list must grant
      Service Account Token Creator IAM role to the directly preceding identity, with first
      account from the list granting this role to the originating account (templated).
  
  :return: An ``google.cloud.bigquery_datatransfer_v1.types.TransferRun`` instance.
class_docstr_tok: ["Waits","for","Data","Transfer","Service","run","to","complete",".","..","seealso",":",":","For","more","information","on","how","to","use","this","sensor",",","take","a","look","at","the","guide",":",":","ref",":","`","howto\/operator",":","BigQueryDataTransferServiceTransferRunSensor","`",":","param","expected_statuses",":","The","expected","state","of","the","operation",".","See",":","https",":","\/\/cloud.google.com\/storage-transfer\/docs\/reference\/rest\/v1\/transferOperations","#","Status",":","param","run_id",":","ID","of","the","transfer","run",".",":","param","transfer_config_id",":","ID","of","transfer","config","to","be","used",".",":","param","project_id",":","The","BigQuery","project","id","where","the","transfer","configuration","should","be","created",".","If","set","to","None","or","missing",",","the","default","project_id","from","the","Google","Cloud","connection","is","used",".",":","param","retry",":","A","retry","object","used","to","retry","requests",".","If","`","None","`","is","specified",",","requests","will","not","be","retried",".",":","param","request_timeout",":","The","amount","of","time",",","in","seconds",",","to","wait","for","the","request","to","complete",".","Note","that","if","retry","is","specified",",","the","timeout","applies","to","each","individual","attempt",".",":","param","metadata",":","Additional","metadata","that","is","provided","to","the","method",".",":","param","impersonation_chain",":","Optional","service","account","to","impersonate","using","short-term","credentials",",","or","chained","list","of","accounts","required","to","get","the","access_token","of","the","last","account","in","the","list",",","which","will","be","impersonated","in","the","request",".","If","set","as","a","string",",","the","account","must","grant","the","originating","account","the","Service","Account","Token","Creator","IAM","role",".","If","set","as","a","sequence",",","the","identities","from","the","list","must","grant","Service","Account","Token","Creator","IAM","role","to","the","directly","preceding","identity",",","with","first","account","from","the","list","granting","this","role","to","the","originating","account","(","templated",")",".",":","return",":","An","``","google.cloud.bigquery_datatransfer_v1.types.TransferRun","``","instance","."]
code: def poke(self, context: Context) -> bool:
      hook = BiqQueryDataTransferServiceHook(
          gcp_conn_id=self.gcp_cloud_conn_id,
          impersonation_chain=self.impersonation_chain,
          location=self.location,
      )
      run = hook.get_transfer_run(
          run_id=self.run_id,
          transfer_config_id=self.transfer_config_id,
          project_id=self.project_id,
          retry=self.retry,
          timeout=self.request_timeout,
          metadata=self.metadata,
      )
      self.log.info("Status of %s run: %s", self.run_id, run.state)
  
      if run.state in (TransferState.FAILED, TransferState.CANCELLED):
          # TODO: remove this if check when min_airflow_version is set to higher than 2.7.1
          message = f"Transfer {self.run_id} did not succeed"
          if self.soft_fail:
              raise AirflowSkipException(message)
          raise AirflowException(message)
      return run.state in self.expected_statuses
  
file_path: airflow/airflow/providers/google/cloud/sensors/bigquery_dts.py
imports: from __future__ import annotations
  from typing import TYPE_CHECKING, Sequence
  from google.api_core.gapic_v1.method import DEFAULT, _MethodDefault
  from google.cloud.bigquery_datatransfer_v1 import TransferState
  from airflow.exceptions import AirflowException, AirflowSkipException
  from airflow.providers.google.cloud.hooks.bigquery_dts import BiqQueryDataTransferServiceHook
  from airflow.sensors.base import BaseSensorOperator
label_desc: Use image node_id 3 for calling the BigQueryDataTransferServiceTransferRunSensor obj's underlying member method code with example usage: obj.poke(context) and returns: unknown