code: def launcher_config_file(
      path: str,
      caliban_config: Optional[Dict[str, Any]] = None,
  ):
      """creates a configuration file for the caliban launcher script
      This file contains the launcher configuration that does not vary across
      each caliban job being submitted, so it can be copied into the container.
  
      This is to be used as a contextmanager yielding the path to the file:
  
      with launcher_config_file('.', caliban_config) as cfg_file:
        # do things
  
      The config file is deleted upon exiting the context scope.
  
      Args:
      path: directory in which to write file (this must exist)
      caliban_config: caliban configuration dictionary
  
      Yields:
      path to configuration file
      """
  
      caliban_config = caliban_config or {}
  
      config = _default_launcher_config()
      config_file_path = os.path.join(path, LAUNCHER_CONFIG_FILE)
  
      mlflow_config = _create_mlflow_config(
          mlflow_cfg=caliban_config.get("mlflow_config"),
          uv_cfg=caliban_config.get("uv"),
      )
  
      config["services"] += mlflow_config["services"]
      config["env"].update(mlflow_config["env"])
  
      with open(config_file_path, "w") as f:
          json.dump(config, f, indent=2)
  
      try:
          yield config_file_path
      finally:
          if os.path.exists(config_file_path):
              os.remove(config_file_path)
  
file_path: caliban/caliban/util/metrics.py
imports: import datetime
  import json
  import os
  import caliban.util
  import caliban.history.types
  from contextlib import contextmanager
  from typing import Dict, Any, List, Optional
label_desc: Use image node_id 5 for calling a global function with example usage: launcher_config_file(path, caliban_config) without return types