code: def test_email_search_key(requests_mock: Mocker):
      url = "http://fake_url2"
  
      mock_default_requests(requests_mock, url)
  
      enricher = FeaturesEnricher(
          search_keys={"email": SearchKey.EMAIL},
          endpoint=url,
          api_key="fake_api_key",
          logs_enabled=False,
      )
  
      df = pd.DataFrame(
          {
              "email": [
                  "test1@gmail.com",
                  "test2@mail.com",
                  "test3@yahoo.com",
              ],
              "target": [0, 1, 0],
          }
      )
      original_search = Dataset.search
      original_min_count = Dataset.MIN_ROWS_COUNT
  
      def mock_search(
          self,
          *args,
          **kwargs,
      ):
          self.validate()
          columns = self.columns.to_list()
          assert set(columns) == {
              "system_record_id",
              "target",
              "hashed_email_64ff8c",
              "email_one_domain_3b0a68",
              "email_domain_10c73f",
          }
          assert {"hashed_email_64ff8c", "email_one_domain_3b0a68"} == {
              sk for sublist in self.search_keys for sk in sublist
          }
          raise TestException()
  
      Dataset.search = mock_search
      Dataset.MIN_ROWS_COUNT = 1
  
      try:
          enricher.fit(df.drop(columns="target"), df.target)
          raise AssertionError("Search should fail")
      except AssertionError:
          raise
      except TestException:
          pass
      finally:
          Dataset.search = original_search
          Dataset.MIN_ROWS_COUNT = original_min_count
  
imports: import os
  from datetime import date
  from typing import List, Optional
  import numpy
  import pandas
  import pytest
  from pandas.testing import assert_frame_equal
  from requests_mock.mocker import Mocker
  from upgini import FeaturesEnricher, SearchKey
  from upgini.dataset import Dataset
  from upgini.errors import ValidationError
  from upgini.http import _RestClient
  from upgini.metadata import CVType, FeaturesMetadataV2, HitRateMetrics, ModelEvalSet, ModelTaskType, ProviderTaskMetadataV2, RuntimeParameters
  from upgini.resource_bundle import bundle
  from upgini.search_task import SearchTask
  from upgini.utils.datetime_utils import DateTimeSearchKeyConverter
  from .utils import mock_default_requests, mock_get_metadata, mock_get_task_metadata_v2, mock_initial_and_validation_summary, mock_initial_progress, mock_initial_search, mock_initial_summary, mock_raw_features, mock_validation_progress, mock_validation_raw_features, mock_validation_search, mock_validation_summary
label_desc: Use image node_id 26 for calling a global function with example usage: test_email_search_key(requests_mock) without return types