code: def test_widget(requests_mock: Mocker):
      url = "http://fake_url"
      mock_default_requests(requests_mock, url)
  
      search_task_id = mock_initial_search(requests_mock, url)
      mock_initial_progress(requests_mock, url, search_task_id)
      ads_search_task_id = mock_initial_summary(
          requests_mock, url, search_task_id
      )
      mock_get_metadata(
          requests_mock,
          url,
          search_task_id,
          metadata_columns=[
              {
                  "index": 0,
                  "name": "ipv4_fake",
                  "originalName": "ipv4",
                  "dataType": "STRING",
                  "meaningType": "IP_ADDRESS",
              },
              {
                  "index": 1,
                  "name": "app_date_fake",
                  "originalName": "app_date",
                  "dataType": "INT",
                  "meaningType": "DATE",
              },
              {
                  "index": 2,
                  "name": "target",
                  "originalName": "target",
                  "dataType": "INT",
                  "meaningType": "TARGET",
              },
              {
                  "index": 3,
                  "name": "system_record_id",
                  "originalName": "system_record_id",
                  "dataType": "INT",
                  "meaningType": "SYSTEM_RECORD_ID",
              },
          ],
          search_keys=["ipv4", "app_date"],
      )
      mock_get_task_metadata_v2(
          requests_mock,
          url,
          ads_search_task_id,
          ProviderTaskMetadataV2(
              features=[
                  FeaturesMetadataV2(
                      name="f_events_date_month_sin4_81a273ac",
                      type="NUMERIC",
                      source="ads",
                      hit_rate=100.0,
                      shap_value=0.0924,
                      commercial_schema="Free",
                      data_provider="Upgini",
                      data_provider_link="https://upgini.com",
                      data_source="Calendar data",
                      data_source_link="https://upgini.com/#data_sources",
                      doc_link="https://docs.upgini.com/public/calendar/calendar#f_events_date_month_sin4_81a273ac",
                  ),
                  FeaturesMetadataV2(
                      name="f_ip_company_name_emb145_e56eb2a3",
                      type="NUMERIC",
                      source="ads",
                      hit_rate=100.0,
                      shap_value=0.0787,
                      commercial_schema="Trial",
                      data_provider="IPInfo",
                      data_provider_link="https://ipinfo.io",
                      data_source="Company IP Address Data",
                      data_source_link="https://app.snowflake.com/marketplace/listing/GZSTZ3VDMFU/?referer=upgini",
                  ),
                  FeaturesMetadataV2(
                      name="f_ip_company_name_emb54_805ee5b8",
                      type="NUMERIC",
                      source="ads",
                      hit_rate=100.0,
                      shap_value=0.0496,
                      commercial_schema="Trial",
                      data_provider="IPInfo",
                      data_provider_link="https://ipinfo.io",
                      data_source="Company IP Address Data",
                      data_source_link="https://app.snowflake.com/marketplace/listing/GZSTZ3VDMFU/?referer=upgini",
                  ),
                  FeaturesMetadataV2(
                      name="f_ip_operator_5d5fc3f3",
                      type="STRING",
                      source="ads",
                      hit_rate=44.5114,
                      shap_value=0.0019,
                      commercial_schema="Trial",
                      data_provider="IPInfo",
                      data_provider_link="https://ipinfo.io",
                      data_source="IP Address Data for Mobile Carrier Detection",
                      data_source_link="https://app.snowflake.com/marketplace/listing/GZSTZ3VDMF6/?referer=upgini",
                  ),
              ],
              hit_rate_metrics=HitRateMetrics(
                  etalon_row_count=10000,
                  max_hit_count=9990,
                  hit_rate=0.999,
                  hit_rate_percent=99.9,
              ),
              eval_set_metrics=[],
          ),
      )
      path_to_mock_features = os.path.join(
          os.path.dirname(os.path.realpath(__file__)),
          "test_data/widget/features.parquet",
      )
      mock_raw_features(
          requests_mock, url, search_task_id, path_to_mock_features
      )
  
      path_to_tds = os.path.join(
          os.path.dirname(os.path.realpath(__file__)),
          "test_data/widget/tds.parquet",
      )
      df = pd.read_parquet(path_to_tds)
  
      relevant_fields, summary, _ = run_search(
          df, "target", "ipv4", "app_date", []
      )
  
      expected_relevant_fields = pd.DataFrame(
          {
              "Field": [
                  (
                      "<div class='tooltip'><a href='https://docs.upgini.com/public/calendar/calendar"
                      "#f_events_date_month_sin4_81a273ac' target='_blank' "
                      "rel='noopener noreferrer'>events_date_month_sin4</a><span class='tooltiptext'>"
                      "-0.5878</br>0.1012</br>0.5878</br>0.866</br>0.5878</br>-0.5878</br>-0.7908</br>0.2079</br>"
                      "-0.0</br>0.4067</span></div>"
                  ),
                  (
                      "<div class='tooltip'>ip_company_name_emb145<span class='tooltiptext'>0.0014</br>0.0014</br>"
                      "-0.0076</br>0.0014</br>0.0014</br>-0.0083</br>0.0318</br>-0.004</br>-0.0078</br>-0.0035"
                      "</span></div>"
                  ),
                  (
                      "<div class='tooltip'>ip_company_name_emb54<span class='tooltiptext'>-0.0289</br>-0.0289</br>"
                      "-0.0209</br>-0.0289</br>-0.0289</br>0.0301</br>-0.0368</br>0.0477</br>0.0487</br>0.0302"
                      "</span></div>"
                  ),
                  (
                      "<div class='tooltip'>ip_operator<span class='tooltiptext'>Beeline</br>Beeline</br>UzMobile</br>"
                      "Beeline</br>Uztelecom</br>Uztelecom</br>Beeline</br>Beeline</br>Beeline</br>Ucell</span></div>"
                  ),
              ],
              "SHAP value": [0.0924, 0.0787, 0.0496, 0.0019],
              "Included in data listings": [
                  (
                      "<a href='https://ipinfo.io/products/ip-database-download' target='_blank' "
                      "rel='noopener noreferrer'>Optimized for ML database</a>"
                  ),
                  (
                      "<a href='https://ipinfo.io/products/ip-database-download' target='_blank' "
                      "rel='noopener noreferrer'>Optimized for ML database</a>"
                  ),
                  (
                      "<a href='https://ipinfo.io/products/ip-database-download' target='_blank' "
                      "rel='noopener noreferrer'>Optimized for ML database</a>"
                  ),
                  (
                      "<a href='https://ipinfo.io/products/ip-database-download' target='_blank' "
                      "rel='noopener noreferrer'>Optimized for ML database</a>, "
                      "<a href='https://app.snowflake.com/marketplace/listing/GZSTZ3VDMF6/?referer=upgini' "
                      "target='_blank' rel='noopener noreferrer'>IP Address Data for Mobile Carrier Detection</a>"
                  ),
              ],
          }
      )
  
      assert_frame_equal(relevant_fields, expected_relevant_fields)
  
      expected_summary = pd.DataFrame(
          {
              "Data listing": [
                  "<a href='https://ipinfo.io/products/ip-database-download'>Optimized for ML database</a>",
                  (
                      "<a href='https://app.snowflake.com/marketplace/listing/GZSTZ3VDMF6/?referer=upgini' "
                      "target='_blank' rel='noopener noreferrer'>IP Address Data for Mobile Carrier Detection</a>"
                  ),
              ],
              "All fields SHAP": [0.2226, 0.0019],
              "Relevant features": [4, 1],
              "Price": ["By request", "Trial 30 days, $80/month"],
              "Action": [
                  (
                      "<div class=\"stButton\"><a href='https://ipinfo.io/products/ip-database-download'>"
                      '<button kind="secondary"><p>Instant purchase</p></button></a></div>'
                  ),
                  (
                      '<div class="stButton"><a href=\'https://app.snowflake.com/marketplace/listing/GZSTZ3VDMF6/'
                      "?referer=upgini' target='_blank' rel='noopener noreferrer'><button kind=\"secondary\"><p>"
                      "Instant purchase</p></button></a></div>"
                  ),
              ],
          }
      )
  
      assert_frame_equal(summary, expected_summary)
  
file_path: upgini/tests/test_widget.py
imports: import logging
  import os
  import re
  from typing import List, Optional, Tuple
  import pandas
  from pandas.api.types import is_float_dtype
  from pandas.testing import assert_frame_equal
  from requests_mock import Mocker
  from tests.utils import mock_default_requests, mock_get_metadata, mock_get_task_metadata_v2, mock_initial_progress, mock_initial_search, mock_initial_summary, mock_raw_features
  from upgini.features_enricher import FeaturesEnricher
  from upgini.metadata import FeaturesMetadataV2, HitRateMetrics, ProviderTaskMetadataV2, RuntimeParameters, SearchKey
label_desc: Use image node_id 2 for calling a global function with example usage: test_widget(requests_mock) without return types