code: def full_text_search(
      index_file_location: str, query: str, offset: int, length: int
  ) -> tuple[int, pa.Table]:
      with duckdb_connect(database=index_file_location) as con:
          count_result = con.execute(
              query=FTS_COMMAND_COUNT, parameters=[query]
          ).fetchall()
          num_rows_total = count_result[0][
              0
          ]  # it will always return a non-empty list with one element in a tuple
          logging.debug(f"got {num_rows_total=} results for {query=}")
          query_result = con.execute(
              query=FTS_COMMAND.format(offset=offset, length=length),
              parameters=[query],
          )
          pa_table = query_result.arrow()
      return num_rows_total, pa_table
  
imports: import logging
  from http import HTTPStatus
  from typing import Optional
  import anyio
  import pyarrow
  from datasets import Features
  from libapi.authentication import auth_check
  from libapi.duckdb import get_cache_entry_from_duckdb_index_job, get_index_file_location_and_download_if_missing
  from libapi.exceptions import ApiError, SearchFeatureNotAvailableError, UnexpectedApiError
  from libapi.request import get_request_parameter, get_request_parameter_length, get_request_parameter_offset
  from libapi.response import ROW_IDX_COLUMN
  from libapi.utils import Endpoint, get_json_api_error_response, get_json_error_response, get_json_ok_response, to_rows_list
  from libcommon.duckdb_utils import duckdb_index_is_partial
  from libcommon.prometheus import StepProfiler
  from libcommon.storage import StrPath
  from libcommon.storage_client import StorageClient
  from libcommon.utils import MAX_NUM_ROWS_PER_PAGE, PaginatedResponse
  from libcommon.viewer_utils.features import get_supported_unsupported_columns, to_features_list
  from starlette.requests import Request
  from starlette.responses import Response
  from search.duckdb_connection import duckdb_connect
label_desc: Use image node_id 1 for calling a global function with example usage: full_text_search(index_file_location, query, offset, length) and returns: num_rows_total,  pa_table