code: def create_study_experiments(
      state,
      exp_config,
      trial_config,
      algorithms,
      task_number,
      max_trial,
      n_workers=(1,),
  ):
      gen_exps, gen_trials = generate_benchmark_experiments_trials(
          algorithms,
          exp_config,
          trial_config,
          task_number * len(n_workers),
          max_trial,
      )
  
      from orion.client.experiment import ExperimentClient
      from orion.executor.joblib_backend import Joblib
  
      workers = []
      for _ in range(task_number):
          for worker in n_workers:
              for _ in range(len(algorithms)):
                  workers.append(worker)
  
      state.add_trials(*gen_trials)
      state.add_experiments(*gen_exps)
  
      experiments = []
      experiments_info = []
      for i in range(task_number * len(n_workers) * len(algorithms)):
          experiment = experiment_builder.build(
              f"experiment-name-{i}", storage=state.storage_config
          )
  
          executor = Joblib(n_workers=workers[i], backend="threading")
          client = ExperimentClient(experiment, executor=executor)
          experiments.append(client)
  
      for index, exp in enumerate(experiments):
          experiments_info.append(exp)
  
      return experiments_info
  
imports: import contextlib
  import copy
  import datetime
  import os
  from contextlib import contextmanager
  from falcon import testing
  import orion.algo.space
  import orion.core.io.experiment_builder
  from orion.core.io.space_builder import SpaceBuilder
  from orion.core.worker.producer import Producer
  from orion.serving.webapi import WebApi
  from orion.testing.state import OrionState
label_desc: Use image node_id 4 for calling a global function with example usage: create_study_experiments(state, exp_config, trial_config, algorithms, task_number, max_trial, n_workers) and returns: experiments_info