code: def _mock_compose_calls(compose):
      from types import MethodType
      from subprocess import CompletedProcess
  
      def _mock(compose, executable):
          def _execute(self, *args, **kwargs):
              params = [
                  "{}={}".format(k, v)
                  for k, v in self.config.params.items()
              ]
              command = " ".join(params + [executable] + list(args))
              click.echo(command)
              return CompletedProcess([], 0)
  
          return MethodType(_execute, compose)
  
      compose._execute_docker = _mock(compose, executable="docker")
      compose._execute_compose = _mock(
          compose, executable="docker-compose"
      )
  
file_path: arrow/dev/archery/archery/docker/cli.py
imports: import os
  import sys
  import click
  from ..utils.cli import validate_arrow_sources
  from .core import DockerCompose, UndefinedImage
label_desc: Use image node_id 1 for calling a global function with example usage: _mock_compose_calls(compose) and returns: MethodType, CompletedProcess