code: def xfail_if_not_installed(
      value: dict, import_optional: ImportOptional
  ):
      name = next(iter(value.keys()))
      return pytest.param(
          value,
          marks=pytest.mark.xfail(
              condition=import_optional.failed,
              reason=f"{name} dependency is requered for these tests",
              raises=ImportError,
          ),
      )
  
imports: from __future__ import annotations
  import copy
  import os
  from pathlib import Path
  import numpy
  import pytest
  from orion.algo.pbt.pb2_utils import import_optional
  from orion.client import build_experiment, create_experiment, workon
  from orion.core.io.space_builder import SpaceBuilder
  from orion.core.utils.module_import import ImportOptional
  from orion.core.worker.algo_wrappers import AlgoWrapper
  from orion.core.worker.primary_algo import SpaceTransform
  from orion.core.worker.trial import Trial
  from orion.storage.base import BaseStorageProtocol
  from orion.benchmark.task.base import BenchmarkTask
label_desc: Use image node_id 1 for calling a global function with example usage: xfail_if_not_installed(value, import_optional) and returns: pytest