code: def generate_config(template, tmp_path):
      """Generate a configuration file inside a temporary directory with the current storage config"""
  
      with open(template) as file:
          conf = yaml.safe_load(file)
  
      conf["storage"] = orion.core.config.storage.to_dict()
      conf_file = os.path.join(tmp_path, "config.yaml")
      config_str = yaml.dump(conf)
  
      with open(conf_file, "w") as file:
          file.write(config_str)
  
      with open(conf_file) as file:
          yield file
  
imports: import os
  import shutil
  import subprocess
  import sys
  import tempfile
  from collections import defaultdict
  from contextlib import contextmanager
  import numpy
  import pytest
  import yaml
  import orion.core.cli
  import orion.core.io.experiment_builder
  from orion.core.cli.hunt import workon
  from orion.testing import OrionState
label_desc: Use image node_id 7 for calling a global function with example usage: generate_config(template, tmp_path) without return types