code: def create_config(directory, yml_content, env_content=None):
      env_path = directory / ".env"
      config_path = directory / "docker-compose.yml"
  
      with config_path.open("w") as fp:
          fp.write(yml_content)
  
      if env_content is not None:
          with env_path.open("w") as fp:
              for k, v in env_content.items():
                  fp.write("{}={}\n".format(k, v))
  
      return config_path
  
imports: import collections
  import os
  import re
  import subprocess
  from unittest import mock
  import pytest
  from archery.docker import DockerCompose
  from archery.testing import assert_subprocess_calls, override_env, PartialEnv
label_desc: Use image node_id 1 for calling a global function with example usage: create_config(directory, yml_content, env_content) and returns: config_path