code: def main():
      study = create_study(
          study_name="test_study",
          storage="sqlite:///example.db",
          load_if_exists=True,
      )
  
      slab, E_slab = create_slab()
      study.set_user_attr("slab", atoms_to_json(slab))
      study.set_user_attr("E_slab", E_slab)
  
      mol, E_mol = create_mol()
      study.set_user_attr("mol", atoms_to_json(mol))
      study.set_user_attr("E_mol", E_mol)
  
      os.makedirs("./tmp", exist_ok=True)
  
      base_path = "./artifacts"
      os.makedirs(base_path, exist_ok=True)
      artifact_store = FileSystemArtifactStore(base_path=base_path)
      study.optimize(Objective(artifact_store), n_trials=3)
      print(
          f"Best trial is #{study.best_trial.number}\n"
          f"    Its adsorption energy is {study.best_value}\n"
          f"    Its adsorption position is\n"
          f"        phi  : {study.best_params['phi']}\n"
          f"        theta: {study.best_params['theta']}\n"
          f"        psi. : {study.best_params['psi']}\n"
          f"        x_pos: {study.best_params['x_pos']}\n"
          f"        y_pos: {study.best_params['y_pos']}\n"
          f"        z_hig: {study.best_params['z_hig']}"
      )
  
      best_artifact_id = study.best_trial.user_attrs["structure"]
      with artifact_store.open_reader(best_artifact_id) as f:
          content = f.read().decode("utf-8")
      best_atoms = json_to_atoms(content)
      print(best_atoms)
      write("best_atoms.png", best_atoms, rotation=("315x,0y,0z"))
  
imports: from __future__ import annotations
  import io
  import logging
  import os
  import sys
  import uuid
  from ase import Atoms
  from ase.build import bulk, fcc111, molecule, add_adsorbate
  from ase.calculators.emt import EMT
  from ase.io import write, read
  from ase.optimize import LBFGS
  import numpy
  from optuna.artifacts import FileSystemArtifactStore
  from optuna.artifacts import upload_artifact
  from optuna.logging import get_logger
  from optuna import create_study
  from optuna import Trial
label_desc: Use image node_id 6 for calling a global function with example usage: main() without return types