code: def _execute_compose(self, *args, **kwargs):
      # execute as a docker compose command
      try:
          result = super().run(
              "--file",
              str(self.config.path),
              *args,
              env=self.config.env,
              **kwargs,
          )
          result.check_returncode()
      except subprocess.CalledProcessError as e:
  
          def formatdict(d, template):
              return "\n".join(
                  template.format(k, v) for k, v in sorted(d.items())
              )
  
          msg = (
              "`{cmd}` exited with a non-zero exit code {code}, see the "
              "process log above.\n\nThe docker-compose command was "
              "invoked with the following parameters:\n\nDefaults defined "
              "in .env:\n{dotenv}\n\nArchery was called with:\n{params}"
          )
          raise RuntimeError(
              msg.format(
                  cmd=" ".join(e.cmd),
                  code=e.returncode,
                  dotenv=formatdict(
                      self.config.dotenv, template="  {}: {}"
                  ),
                  params=formatdict(
                      self.config.params, template="  export {}={}"
                  ),
              )
          )
  
imports: import os
  import shlex
  import subprocess
  from io import StringIO
  from dotenv import dotenv_values
  from ruamel.yaml import YAML
  from ..utils.command import Command, default_bin
  from ..utils.source import arrow_path
  from ..compat import _ensure_path
label_desc: Use image node_id 3 for calling the DockerCompose obj's underlying member method code with example usage: obj._execute_compose() and returns: str