code: def test_config_validation(tmpdir):
      config_path = create_config(tmpdir, missing_service_compose_yml)
      msg = (
          "`sub-foo` is defined in `x-hierarchy` bot not in `services`"
      )
      with pytest.raises(ValueError, match=msg):
          DockerCompose(config_path)
  
      config_path = create_config(tmpdir, missing_node_compose_yml)
      msg = (
          "`sub-bar` is defined in `services` but not in `x-hierarchy`"
      )
      with pytest.raises(ValueError, match=msg):
          DockerCompose(config_path)
  
      config_path = create_config(tmpdir, ok_compose_yml)
      DockerCompose(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 4 for calling a global function with example usage: test_config_validation(tmpdir) without return types