code: def _remove_target_config(
      target_exp_config: ExperimentConfig,
      exp_configs: list[ExperimentConfig],
  ) -> list[ExperimentConfig]:
      """Removes the config matching the target experiment from `exp_configs`, if present.
  
      NOTE: We unfortunately can't just use `exp_configs.remove(target_exp_config)` because the dicts
      might not match exactly, due to small mutations that happen when going in and out of Storage.
      For instance, the `working_dir` property changes type "" -> None, and other fields might also.
  
      Therefore we do a simple check based on the name, id, and version number of the experiment to
      determine if it is the same experiment as the target.
      """
      result: list[ExperimentConfig] = []
      for exp_config in exp_configs:
          if not (
              exp_config["_id"] == target_exp_config["_id"]
              and exp_config["name"] == target_exp_config["name"]
              and exp_config["version"] == target_exp_config["version"]
          ):
              result.append(exp_config)
      return result
  
file_path: orion/src/orion/core/worker/warm_start/knowledge_base.py
imports: from __future__ import annotations
  import inspect
  import typing
  from functools import partial
  from logging import getLogger
  from typing import Any, Callable, Iterable
label_desc: Use image node_id 1 for calling a global function with example usage: _remove_target_config(target_exp_config, exp_configs) and returns: result