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: Search an index.
  
  Parameters
  ----------
  index_id : str
      ID of the index.
  
  query : str
      Query to be searched.
  
  search_options : List[str]
      List of search options to be used.
  
  Returns
  -------
  Dict
      Search results.
docstr_tok: ["Search","an","index",".","Parameters","--","--","--","--","--","index_id",":","str","ID","of","the","index",".","query",":","str","Query","to","be","searched",".","search_options",":","List","[","str","]","List","of","search","options","to","be","used",".","Returns","--","--","--","-","Dict","Search","results","."]
code: def search_index(
      self, index_id: str, query: str, search_options: List[str]
  ) -> Dict:
      """
      Search an index.
  
      Parameters
      ----------
      index_id : str
          ID of the index.
  
      query : str
          Query to be searched.
  
      search_options : List[str]
          List of search options to be used.
  
      Returns
      -------
      Dict
          Search results.
      """
  
      body = {
          "index_id": index_id,
          "query": query,
          "search_options": search_options,
      }
  
      data = []
      result = self._submit_request(
          method="POST",
          endpoint="search",
          data=body,
      )
      data.extend(result["data"])
  
      while "next_page_token" in result["page_info"]:
          result = self._submit_request(
              method="GET",
              endpoint=f"search/{result['page_info']['next_page_token']}",
          )
          data.extend(result["data"])
  
      logger.info(
          f"Search for index {index_id} completed successfully."
      )
      return data
  
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 8 for calling the TwelveLabsAPIClient obj's underlying member method code with example usage: obj.search_index(index_id, query, search_options) and returns: data