code: def create_study(seed: int) -> optuna.Study:
      # Avoid the fail by `flake8`.
      seed
  
      n_objectives = 2
      directions = ["minimize"] * n_objectives
  
      sampler_name = sys.argv[1]
  
      # Sampler.
      sampler_cls = getattr(
          optuna.samplers,
          sampler_name,
          getattr(optuna.integration, sampler_name, None),
      )
      if sampler_cls is None:
          raise ValueError("Unknown sampler: {}.".format(sampler_name))
  
      sampler_kwargs = json.loads(sys.argv[2])
      sampler = sampler_cls(**sampler_kwargs)
  
      return optuna.create_study(
          directions=directions,
          sampler=sampler,
          pruner=optuna.pruners.NopPruner(),
      )
  
imports: import json
  import sys
  from kurobako import solver
  from kurobako.solver.optuna import OptunaSolverFactory
  import optuna
label_desc: Use image node_id 1 for calling a global function with example usage: create_study(seed) and returns: optuna