code: def compute_stats(
      monitoring_method="ptera",
      executor="joblib",
      max_trials=(498, 500),
      sleep_time=30,
  ):
      experiment = build_experiment(
          f"test-io-{executor}-{monitoring_method}",
          space=dict(x="uniform(0, 1, precision=100)"),
          max_trials=max_trials[1],
      )
  
      with experiment.tmp_executor(executor, n_workers=1):
          experiment.workon(
              foo,
              max_trials=max_trials[1],
              max_trials_per_worker=max_trials[0],
              sleep_time=0.0001,
          )
  
          with monitoring_methods[monitoring_method]() as data:
              experiment.workon(
                  foo,
                  max_trials=max_trials[1],
                  max_trials_per_worker=max_trials[1] - max_trials[0],
                  sleep_time=sleep_time,
              )
  
      return data
  
imports: import argparse
  import contextlib
  import multiprocessing
  import subprocess
  import sys
  import time
  from collections import defaultdict, namedtuple
  import bson
  import numpy
  from ptera import probing
  from orion.client import build_experiment
  from orion.client.runner import Runner
  from orion.core.io.database.pickleddb import PickledDB
  from orion.testing import OrionState
label_desc: Use image node_id 17 for calling a global function with example usage: compute_stats(monitoring_method, executor, max_trials, sleep_time) and returns: data