code: def test_features_enricher_with_complex_feature_names(
      requests_mock: Mocker,
  ):
      url = "http://fake_url2"
  
      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,
      )
      requests_mock.get(
          url + f"/public/api/v2/search/{search_task_id}/metadata",
          json={
              "fileUploadId": "123",
              "fileMetadataId": "123",
              "name": "test",
              "description": "",
              "columns": [
                  {
                      "index": 0,
                      "name": "phone_num",
                      "originalName": "phone_num",
                      "dataType": "STRING",
                      "meaningType": "MSISDN",
                  },
                  {
                      "index": 1,
                      "name": "cos_3_freq_w_sun_",
                      "originalName": "cos(3,freq=W-SUN)",
                      "dataType": "INT",
                      "meaningType": "FEATURE",
                  },
                  {
                      "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",
                  },
              ],
              "searchKeys": [["phone_num"]],
              "hierarchicalGroupKeys": [],
              "hierarchicalSubgroupKeys": [],
              "rowsCount": 5319,
          },
      )
  
      mock_get_task_metadata_v2(
          requests_mock,
          url,
          ads_search_task_id,
          ProviderTaskMetadataV2(
              features=[
                  FeaturesMetadataV2(
                      name="f_feature123",
                      type="numerical",
                      source="ads",
                      hit_rate=99.0,
                      shap_value=0.9,
                  ),
                  FeaturesMetadataV2(
                      name="cos_3_freq_w_sun_",
                      type="numerical",
                      source="etalon",
                      hit_rate=100.0,
                      shap_value=0.1,
                  ),
              ],
              hit_rate_metrics=HitRateMetrics(
                  etalon_row_count=5319,
                  max_hit_count=5266,
                  hit_rate=0.99,
                  hit_rate_percent=99.0,
              ),
              features_used_for_embeddings=["cos_3_freq_w_sun_"],
          ),
      )
      path_to_mock_features = os.path.join(
          os.path.dirname(os.path.realpath(__file__)),
          "test_data/complex_feature_name_features.parquet",
      )
      mock_raw_features(
          requests_mock,
          url,
          search_task_id,
          path_to_mock_features,
          metrics_calculation=True,
      )
  
      path = os.path.join(
          os.path.dirname(os.path.realpath(__file__)),
          "test_data/complex_feature_name_tds.parquet",
      )
      df = pd.read_parquet(path)
      train_features = df.drop(columns="target")
      train_target = df["target"]
  
      enricher = FeaturesEnricher(
          search_keys={"phone_num": SearchKey.PHONE},
          endpoint=url,
          api_key="fake_api_key",
          date_format="%Y-%m-%d",
          cv=CVType.time_series,
          logs_enabled=False,
      )
  
      enricher.fit(
          train_features,
          train_target,
          calculate_metrics=False,
      )
  
      metrics = enricher.calculate_metrics()
      expected_metrics = pd.DataFrame(
          {
              segment_header: [train_segment],
              rows_header: [5319],
              target_mean_header: [0.6364],
              baseline_gini: [0.001041],
              enriched_gini: [0.006466],
              uplift: [0.005425],
          }
      )
      print("Expected metrics: ")
      print(expected_metrics)
      print("Actual metrics: ")
      print(metrics)
  
      assert metrics is not None
      assert_frame_equal(expected_metrics, metrics, atol=1e-6)
  
      features_info = enricher.get_features_info()
      print(features_info)
  
      assert enricher.feature_names_ == ["f_feature123"]
      assert enricher.feature_importances_ == [0.9]
      assert len(features_info) == 1
      first_feature_info = features_info.iloc[0]
      assert first_feature_info[feature_name_header] == "f_feature123"
      assert first_feature_info[shap_value_header] == 0.9
      assert first_feature_info[hitrate_header] == 99.0
      # Client features are no longer shown
      # second_feature_info = features_info.iloc[1]
      # assert second_feature_info[feature_name_header] == "cos(3,freq=W-SUN)"
      # assert second_feature_info[shap_value_header] == 0.1
      # assert second_feature_info[hitrate_header] == 100.0
  
      validation_search_task_id = mock_validation_search(
          requests_mock, url, search_task_id
      )
      mock_validation_progress(
          requests_mock, url, validation_search_task_id
      )
      mock_validation_summary(
          requests_mock,
          url,
          search_task_id,
          ads_search_task_id,
          validation_search_task_id,
      )
      mock_validation_raw_features(
          requests_mock,
          url,
          validation_search_task_id,
          path_to_mock_features,
      )
  
      original_validation = Dataset.validation
  
      def wrapped_validation(
          self,
          trace_id: str,
          initial_search_task_id: str,
          start_time: int,
          return_scores: bool = True,
          extract_features: bool = False,
          runtime_parameters: Optional[RuntimeParameters] = None,
          exclude_features_sources: Optional[List[str]] = None,
          metrics_calculation: bool = False,
          silent_mode: bool = False,
          progress_bar=None,
          progress_callback=None,
      ):
          assert "cos(3,freq=W-SUN)" in self.data.columns
          assert (
              runtime_parameters.properties["features_for_embeddings"]
              == "cos_3_freq_w_sun_"
          )
          return original_validation(
              self,
              trace_id,
              initial_search_task_id,
              start_time,
              return_scores,
              extract_features,
              runtime_parameters,
              exclude_features_sources,
              metrics_calculation,
              silent_mode,
              progress_bar,
              progress_callback,
          )
  
      Dataset.validation = wrapped_validation
  
      try:
          transformed = enricher.transform(train_features)
          print(transformed)
      finally:
          Dataset.validation = original_validation
  
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 11 for calling a global function with example usage: test_features_enricher_with_complex_feature_names(requests_mock) and returns: original_validation