code: def main():
      """Run all stress tests and render the plot"""
      size = 500
  
      num_workers = [1, 4, 16, 32, 64, 128]
  
      fig, axis = plt.subplots(
          len(num_workers),
          1,
          figsize=(5, 1.8 * len(num_workers)),
          gridspec_kw={"hspace": 0.01, "wspace": 0},
          sharex="col",
      )
  
      results = {}
  
      for i, workers in enumerate(num_workers):
          results[workers] = benchmark(workers, size)
  
          for backend in ["mongodb", "pickleddb"]:
              for space_type in ["discrete", "real", "real-seeded"]:
                  x, y = results[workers][(backend, space_type)]
                  axis[i].plot(x, y, label=f"{backend}-{space_type}")
  
      for i, workers in enumerate(num_workers):
          # We pick 'pickleddb' and discrete=True as the reference for the slowest ones
          x, y = results[min(num_workers)][("pickleddb", "discrete")]
          d_x = max(x) - min(x)
          d_y = max(y) - min(y)
          if i < len(num_workers) - 1:
              axis[i].text(
                  min(x) + d_x * 0.6,
                  min(y) + d_y * 0.1,
                  f"{workers: 3d} workers",
              )
          else:
              axis[i].text(
                  min(x) + d_x * 0.6,
                  min(y) + d_y * 0.7,
                  f"{workers: 3d} workers",
              )
  
      for i in range(len(num_workers) - 1):
          axis[i].spines["top"].set_visible(False)
          axis[i].spines["right"].set_visible(False)
  
      axis[-1].spines["right"].set_visible(False)
      axis[-1].spines["top"].set_visible(False)
  
      axis[-1].set_xlabel("Time (s)")
      axis[-1].set_ylabel("Number of trials")
      axis[-1].legend()
  
      plt.subplots_adjust(left=0.15, bottom=0.05, top=1, right=1)
  
      plt.savefig("test.png")
  
file_path: orion/tests/stress/client/stress_experiment.py
imports: import os
  import random
  import time
  import traceback
  from multiprocessing import Pool
  import matplotlib.pyplot
  from pymongo import MongoClient
  from orion.client import create_experiment
  from orion.core.io.database import DatabaseTimeout
  from orion.core.utils.exceptions import ReservationTimeout
label_desc: Use image node_id 7 for calling a global function with example usage: main() without return types