code: from datasets import load_dataset
  import lancedb
  import pytest
  import main
  
  # ==================== TESTING ====================
  
  
  @pytest.fixture
  def mock_embed_func(monkeypatch):
      def mock_api_call(*args, **kwargs):
          return [0.5, 0.5]
  
      monkeypatch.setattr(main, "embed", mock_api_call)
  
  
  @pytest.fixture
  def mock_embed_txt_func(monkeypatch):
      def mock_api_call(*args, **kwargs):
          return [0.5, 0.5]
  
      monkeypatch.setattr(main, "embed_txt", mock_api_call)
  
  
  def test_main(mock_embed_func, mock_embed_txt_func):
      global dataset
      dataset = load_dataset(
          "CVdatasets/ImageNet15_animals_unbalanced_aug1", split="train"
      )
      main.dataset = dataset
  
      db = lancedb.connect("./data/tables")
  
      global tbl
      try:
          tbl = main.create_data(db)
          main.tbl = tbl
      except:
          tbl = db.open_table("animal_images")
          main.tbl = tbl
  
      print(tbl.to_pandas())
  
      global test
      test = load_dataset(
          "CVdatasets/ImageNet15_animals_unbalanced_aug1", split="validation"
      )
      main.test = test
  
      main.image_search(0)
      main.text_search("a full white dog")
  
apis: lancedb.connect
extract_api: [((570, 646), 'datasets.load_dataset', 'load_dataset', (['"""CVdatasets/ImageNet15_animals_unbalanced_aug1"""'], {'split': '"""train"""'}), "('CVdatasets/ImageNet15_animals_unbalanced_aug1', split='train')\n", (582, 646), False, 'from datasets import load_dataset\n'), ((698, 730), 'lancedb.connect', 'lancedb.connect', (['"""./data/tables"""'], {}), "('./data/tables')\n", (713, 730), False, 'import lancedb\n'), ((950, 1036), 'datasets.load_dataset', 'load_dataset', (['"""CVdatasets/ImageNet15_animals_unbalanced_aug1"""'], {'split': '"""validation"""'}), "('CVdatasets/ImageNet15_animals_unbalanced_aug1', split=\n    'validation')\n", (962, 1036), False, 'from datasets import load_dataset\n'), ((1072, 1092), 'main.image_search', 'main.image_search', (['(0)'], {}), '(0)\n', (1089, 1092), False, 'import main\n'), ((1097, 1133), 'main.text_search', 'main.text_search', (['"""a full white dog"""'], {}), "('a full white dog')\n", (1113, 1133), False, 'import main\n'), ((770, 790), 'main.create_data', 'main.create_data', (['db'], {}), '(db)\n', (786, 790), False, 'import main\n')]