code: def mock_validation_raw_features(
      requests_mock: Mocker,
      url: str,
      validation_search_task_id: str,
      mock_features: Union[str, pd.DataFrame],
      metrics_calculation=False,
  ):
      ads_search_task_features_id = random_id()
      api = (
          f"{url}/public/api/v2/search/rawfeatures/{validation_search_task_id}"
          f"?metricsCalculation={str(metrics_calculation).lower()}"
      )
      requests_mock.get(
          api,
          json={
              "adsSearchTaskFeaturesDTO": [
                  {
                      "searchType": "VALIDATION",
                      "adsSearchTaskFeaturesId": ads_search_task_features_id,
                  }
              ]
          },
      )
      if isinstance(mock_features, str):
          with open(mock_features, "rb") as f:
              buffer = f.read()
              requests_mock.get(
                  url
                  + f"/public/api/v2/search/rawfeatures/{ads_search_task_features_id}/file",
                  content=buffer,
              )
      elif isinstance(mock_features, pd.DataFrame):
          with tempfile.TemporaryDirectory() as tmp_dir:
              mock_features.to_parquet(f"{tmp_dir}/tmp.parquet")
              with open(f"{tmp_dir}/tmp.parquet", "rb") as f:
                  buffer = f.read()
                  requests_mock.get(
                      url
                      + f"/public/api/v2/search/rawfeatures/{ads_search_task_features_id}/file",
                      content=buffer,
                  )
      else:
          raise Exception(
              f"Unsupported type of mock features: {type(mock_features)}. Supported only string (path) or DataFrame"
          )
  
imports: import itertools
  import tempfile
  from random import randint
  from typing import Dict, List, Optional, Union
  import pandas
  from requests_mock import Mocker
  from upgini.metadata import ProviderTaskMetadataV2
label_desc: Use image node_id 13 for calling a global function with example usage: mock_validation_raw_features(requests_mock, url, validation_search_task_id, mock_features, metrics_calculation) without return types