code: def _execute_import(
      dst_storage,
      queries_to_delete,
      data_to_add,
      progress_callback=None,
  ):
      """Execute import
  
      Parameters
      ----------
      dst_storage: BaseStorageProtocol
          destination storage where to apply changes
      queries_to_delete: dict
          dictionary mapping a collection name to a list of queries to use
          to find and delete data
      data_to_add: dict
          dictionary mapping a collection name to a list of data to add
      progress_callback:
          See :func:`load_database`
      """
  
      # Delete data
  
      total_queries = sum(
          len(queries) for queries in queries_to_delete.values()
      )
      for collection_name in COLLECTIONS:
          queries_to_delete.setdefault(collection_name, ())
      i_query = 0
      for query_delete_benchmark in queries_to_delete[COL_BENCHMARKS]:
          logger.info(
              f"Deleting from {len(queries_to_delete[COL_BENCHMARKS])} queries into {COL_BENCHMARKS}"
          )
          dst_storage.delete_benchmark(query_delete_benchmark)
          _describe_import_progress(
              STEP_DELETE_OLD_DATA,
              i_query,
              total_queries,
              progress_callback,
          )
          i_query += 1
      for query_delete_experiment in queries_to_delete[COL_EXPERIMENTS]:
          logger.info(
              f"Deleting from {len(queries_to_delete[COL_EXPERIMENTS])} queries "
              f"into {COL_EXPERIMENTS}"
          )
          dst_storage.delete_experiment(
              uid=query_delete_experiment["_id"]
          )
          _describe_import_progress(
              STEP_DELETE_OLD_DATA,
              i_query,
              total_queries,
              progress_callback,
          )
          i_query += 1
      for query_delete_trials in queries_to_delete[COL_TRIALS]:
          logger.info(
              f"Deleting from {len(queries_to_delete[COL_TRIALS])} queries into {COL_TRIALS}"
          )
          dst_storage.delete_trials(
              uid=query_delete_trials["experiment"]
          )
          _describe_import_progress(
              STEP_DELETE_OLD_DATA,
              i_query,
              total_queries,
              progress_callback,
          )
          i_query += 1
      for query_delete_algo in queries_to_delete[COL_ALGOS]:
          logger.info(
              f"Deleting from {len(queries_to_delete[COL_ALGOS])} queries into {COL_ALGOS}"
          )
          dst_storage.delete_algorithm_lock(
              uid=query_delete_algo["experiment"]
          )
          _describe_import_progress(
              STEP_DELETE_OLD_DATA,
              i_query,
              total_queries,
              progress_callback,
          )
          i_query += 1
  
      _describe_import_progress(
          STEP_DELETE_OLD_DATA,
          total_queries,
          total_queries,
          progress_callback,
      )
  
      # Add data
  
      nb_data_to_add = len(data_to_add.get(COL_BENCHMARKS, ())) + len(
          data_to_add.get(COL_EXPERIMENTS, ())
      )
      i_data = 0
  
      for new_benchmark in data_to_add.get(COL_BENCHMARKS, ()):
          dst_storage.create_benchmark(new_benchmark)
          _describe_import_progress(
              STEP_INSERT_NEW_DATA,
              i_data,
              nb_data_to_add,
              progress_callback,
          )
          i_data += 1
  
      src_to_dst_id = {}
      for src_exp in data_to_add.get(COL_EXPERIMENTS, ()):
          exp_key = _get_exp_key(src_exp)
          new_algo = data_to_add[COL_ALGOS][exp_key]
          new_trials = data_to_add[COL_TRIALS][exp_key]
          _write_experiment(
              src_exp,
              algo_lock_info=new_algo,
              trials=new_trials,
              dst_storage=dst_storage,
              src_to_dst_id=src_to_dst_id,
              verbose=False,
          )
          _describe_import_progress(
              STEP_INSERT_NEW_DATA,
              i_data,
              nb_data_to_add,
              progress_callback,
          )
          i_data += 1
  
      _describe_import_progress(
          STEP_INSERT_NEW_DATA,
          nb_data_to_add,
          nb_data_to_add,
          progress_callback,
      )
  
imports: import logging
  import os
  import shutil
  from typing import Any, Dict, List
  from orion.core.io.database import DatabaseError
  from orion.core.io.database.pickleddb import PickledDB
  from orion.core.utils import generate_temporary_file
  from orion.core.utils.tree import TreeNode
  from orion.storage.base import BaseStorageProtocol, setup_storage
label_desc: Use image node_id 6 for calling a global function with example usage: _execute_import(dst_storage, queries_to_delete, data_to_add, progress_callback) without return types