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: Create a video indexing task.
  
  Parameters
  ----------
  index_id : str
      ID of the index.
  
  video_url : str, Optional
      URL of the video to be indexed. Either video_url or video_file should be provided. This validation is handled by TwelveLabsHandlerModel.
  
  video_file : str, Optional
      Path to the video file to be indexed. Either video_url or video_file should be provided. This validation is handled by TwelveLabsHandlerModel.
  
  Returns
  -------
  str
      ID of the created task.
docstr_tok: ["Create","a","video","indexing","task",".","Parameters","--","--","--","--","--","index_id",":","str","ID","of","the","index",".","video_url",":","str",",","Optional","URL","of","the","video","to","be","indexed",".","Either","video_url","or","video_file","should","be","provided",".","This","validation","is","handled","by","TwelveLabsHandlerModel",".","video_file",":","str",",","Optional","Path","to","the","video","file","to","be","indexed",".","Either","video_url","or","video_file","should","be","provided",".","This","validation","is","handled","by","TwelveLabsHandlerModel",".","Returns","--","--","--","-","str","ID","of","the","created","task","."]
code: def _create_video_indexing_task(
      self, index_id: str, video_url: str = None, video_file: str = None
  ) -> str:
      """
      Create a video indexing task.
  
      Parameters
      ----------
      index_id : str
          ID of the index.
  
      video_url : str, Optional
          URL of the video to be indexed. Either video_url or video_file should be provided. This validation is handled by TwelveLabsHandlerModel.
  
      video_file : str, Optional
          Path to the video file to be indexed. Either video_url or video_file should be provided. This validation is handled by TwelveLabsHandlerModel.
  
      Returns
      -------
      str
          ID of the created task.
      """
  
      body = {
          "index_id": index_id,
      }
  
      if video_url:
          body["video_url"] = video_url
      elif video_file:
          body["video_file"] = video_file
  
      result = self._submit_multi_part_request(
          method="POST",
          endpoint="tasks",
          data=body,
      )
  
      task_id = result["_id"]
      logger.info(
          f"Created video indexing task {task_id} for {video_url if video_url else video_file} successfully."
      )
      return task_id
  
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 5 for calling the TwelveLabsAPIClient obj's underlying member method code with example usage: obj._create_video_indexing_task(index_id, video_url, video_file) and returns: task_id