code: def mock_initial_and_validation_summary(
      requests_mock: Mocker,
      url: str,
      search_task_id: str,
      validation_search_task_id: str,
  ):
      ads_search_task_id = random_id()
      validation_ads_search_task_id = random_id()
      # metrics = _construct_metrics(hit_rate, auc, rmse, accuracy, uplift)
  
      req_counter = RequestsCounter()
      file_upload_task_id = random_id()
  
      def response(request, context):
          if req_counter.count == 0:
              req_counter.increment()
              return {
                  "fileUploadTaskId": file_upload_task_id,
                  "searchTaskId": search_task_id,
                  "searchTaskStatus": "CREATED",
                  "featuresFoundCount": 1,
                  "providersCheckedCount": 1,
                  "importantProvidersCount": 1,
                  "importantFeaturesCount": 1,
                  "importantProviders": [],
                  "validationImportantProviders": [],
                  "createdAt": 1633302145414,
              }
          elif req_counter.count == 1:
              req_counter.increment()
              return {
                  "fileUploadTaskId": file_upload_task_id,
                  "searchTaskId": search_task_id,
                  "searchTaskStatus": "SUBMITTED",
                  "featuresFoundCount": 1,
                  "providersCheckedCount": 1,
                  "importantProvidersCount": 1,
                  "importantFeaturesCount": 1,
                  "importantProviders": [
                      {
                          "adsSearchTaskId": ads_search_task_id,
                          "searchTaskId": search_task_id,
                          "searchType": "INITIAL",
                          "taskStatus": "SUBMITTED",
                      }
                  ],
                  "validationImportantProviders": [],
                  "createdAt": 1633302145414,
              }
          elif req_counter.count == 2:
              req_counter.increment()
              return {
                  "fileUploadTaskId": file_upload_task_id,
                  "searchTaskId": search_task_id,
                  "searchTaskStatus": "COMPLETED",
                  "featuresFoundCount": 1,
                  "providersCheckedCount": 1,
                  "importantProvidersCount": 1,
                  "importantFeaturesCount": 1,
                  "importantProviders": [
                      {
                          "adsSearchTaskId": ads_search_task_id,
                          "searchTaskId": search_task_id,
                          "searchType": "INITIAL",
                          "taskStatus": "COMPLETED",
                      }
                  ],
                  "validationImportantProviders": [],
                  "createdAt": 1633302145414,
              }
          elif req_counter.count == 3:
              req_counter.increment()
              return {
                  "fileUploadTaskId": "validation_fileUploadTaskId",
                  "searchTaskId": search_task_id,
                  "searchTaskStatus": "VALIDATION_CREATED",
                  "featuresFoundCount": 1,
                  "providersCheckedCount": 1,
                  "importantProvidersCount": 1,
                  "importantFeaturesCount": 1,
                  "importantProviders": [
                      {
                          "adsSearchTaskId": ads_search_task_id,
                          "searchTaskId": search_task_id,
                          "searchType": "INITIAL",
                          "taskStatus": "COMPLETED",
                      }
                  ],
                  "validationImportantProviders": [],
                  "createdAt": 1633302145414,
              }
          elif req_counter.count == 4:
              req_counter.increment()
              return {
                  "fileUploadTaskId": "validation_fileUploadTaskId",
                  "searchTaskId": search_task_id,
                  "searchTaskStatus": "VALIDATION_SUBMITTED",
                  "featuresFoundCount": 1,
                  "providersCheckedCount": 1,
                  "importantProvidersCount": 1,
                  "importantFeaturesCount": 1,
                  "importantProviders": [
                      {
                          "adsSearchTaskId": ads_search_task_id,
                          "searchTaskId": search_task_id,
                          "searchType": "INITIAL",
                          "taskStatus": "COMPLETED",
                      }
                  ],
                  "validationImportantProviders": [
                      {
                          "adsSearchTaskId": validation_ads_search_task_id,
                          "searchTaskId": validation_search_task_id,
                          "searchType": "VALIDATION",
                          "taskStatus": "SUBMITTED",
                      }
                  ],
                  "createdAt": 1633302145414,
              }
          else:
              req_counter.increment()
              return {
                  "fileUploadTaskId": "validation_fileUploadTaskId",
                  "searchTaskId": search_task_id,
                  "searchTaskStatus": "COMPLETED",
                  "featuresFoundCount": 1,
                  "providersCheckedCount": 1,
                  "importantProvidersCount": 1,
                  "importantFeaturesCount": 1,
                  "importantProviders": [
                      {
                          "adsSearchTaskId": ads_search_task_id,
                          "searchTaskId": search_task_id,
                          "searchType": "INITIAL",
                          "taskStatus": "COMPLETED",
                      }
                  ],
                  "validationImportantProviders": [
                      {
                          "adsSearchTaskId": validation_ads_search_task_id,
                          "searchTaskId": validation_search_task_id,
                          "searchType": "VALIDATION",
                          "taskStatus": "VALIDATION_COMPLETED",
                      }
                  ],
                  "createdAt": 1633302145414,
              }
  
      requests_mock.get(
          url + "/public/api/v2/search/" + search_task_id,
          json=response,
      )
      return ads_search_task_id
  
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 10 for calling a global function with example usage: mock_initial_and_validation_summary(requests_mock, url, search_task_id, validation_search_task_id) and returns: ads_search_task_id, dict, dict, dict, dict, dict, dict