code: def test_demo_with_shutdown_quickly(storage, monkeypatch, tmp_path):
      """Check simple pipeline with random search is reasonably fast."""
  
      monkeypatch.chdir(os.path.dirname(os.path.abspath(__file__)))
  
      monkeypatch.setattr(orion.core.config.worker, "heartbeat", 120)
  
      with generate_config(
          "orion_config_random.yaml", tmp_path
      ) as conf_file:
          process = subprocess.Popen(
              [
                  "orion",
                  "hunt",
                  "--config",
                  f"{conf_file.name}",
                  "--max-trials",
                  "10",
                  "./black_box.py",
                  "-x~uniform(-50, 50)",
              ]
          )
  
          assert process.wait(timeout=40) == 0
  
imports: import os
  import shutil
  import subprocess
  import sys
  import tempfile
  from collections import defaultdict
  from contextlib import contextmanager
  import numpy
  import pytest
  import yaml
  import orion.core.cli
  import orion.core.io.experiment_builder
  from orion.core.cli.hunt import workon
  from orion.testing import OrionState
label_desc: Use image node_id 20 for calling a global function with example usage: test_demo_with_shutdown_quickly(storage, monkeypatch, tmp_path) without return types