docstr: Called before the optimization starts.
docstr_tok: ["Called","before","the","optimization","starts","."]
code: def on_start(self, smbo: SMBO) -> None:
      """Called before the optimization starts."""
      path = smbo._scenario.output_directory
      meta_dict = {
          "utc_time": str(datetime.utcnow()),
          "os": platform.platform(),
          "smac_version": getattr(smac, "version"),
      }
      for key, value in self.kwargs.items():
          meta_dict[key] = value
  
      path.mkdir(parents=True, exist_ok=True)
  
      with open(path / "metadata.json", "w") as fp:
          json.dump(meta_dict, fp, indent=2)
  
file_path: SMAC3/smac/callback/metadata_callback.py
imports: from __future__ import annotations
  import json
  import platform
  from datetime import datetime
  import smac
  from smac.callback.callback import Callback
  from smac.main.smbo import SMBO
label_desc: Use image node_id 2 for calling the MetadataCallback obj's underlying member method code with example usage: obj.on_start(smbo) without return types