class_docstr: The Twelve Labs API client for the Twelve Labs handler.
  This client is used for accessing the Twelve Labs API endpoints.
class_docstr_tok: ["The","Twelve","Labs","API","client","for","the","Twelve","Labs","handler",".","This","client","is","used","for","accessing","the","Twelve","Labs","API","endpoints","."]
docstr: Poll for video indexing tasks to complete.
  
  Parameters
  ----------
  task_ids : List[str]
      List of task IDs to be polled.
  
  Returns
  -------
  None
docstr_tok: ["Poll","for","video","indexing","tasks","to","complete",".","Parameters","--","--","--","--","--","task_ids",":","List","[","str","]","List","of","task","IDs","to","be","polled",".","Returns","--","--","--","-","None"]
code: def poll_for_video_indexing_tasks(self, task_ids: List[str]) -> None:
      """
      Poll for video indexing tasks to complete.
  
      Parameters
      ----------
      task_ids : List[str]
          List of task IDs to be polled.
  
      Returns
      -------
      None
      """
  
      for task_id in task_ids:
          logger.info(
              f"Polling status of video indexing task {task_id}."
          )
          is_task_running = True
  
          while is_task_running:
              task = self._get_video_indexing_task(task_id=task_id)
              status = task["status"]
              logger.info(f"Task {task_id} is in the {status} state.")
  
              wait_durtion = (
                  task["process"]["remain_seconds"]
                  if "process" in task
                  else twelve_labs_handler_config.DEFAULT_WAIT_DURATION
              )
  
              if status in ("pending", "indexing", "validating"):
                  logger.info(
                      f"Task {task_id} will be polled again in {wait_durtion} seconds."
                  )
                  time.sleep(wait_durtion)
  
              elif status == "ready":
                  logger.info(f"Task {task_id} completed successfully.")
                  is_task_running = False
  
              else:
                  logger.error(
                      f"Task {task_id} failed with status {task['status']}."
                  )
                  # TODO: update Exception to be more specific
                  raise Exception(
                      f"Task {task_id} failed with status {task['status']}."
                  )
  
      logger.info("All videos indexed successfully.")
  
file_path: mindsdb/mindsdb/integrations/handlers/twelve_labs_handler/twelve_labs_api_client.py
imports: import time
  import requests
  from typing import Dict, List, Optional
  from requests_toolbelt.multipart.encoder import MultipartEncoder
  from mindsdb.utilities import log
  from mindsdb.integrations.handlers.twelve_labs_handler.settings import twelve_labs_handler_config
label_desc: Use image node_id 6 for calling the TwelveLabsAPIClient obj's underlying member method code with example usage: obj.poll_for_video_indexing_tasks(task_ids) without return types