code: def get_output(cwd, command):
      """Run the given command and return its output as a string."""
      process = subprocess.Popen(
          command,
          cwd=cwd,
          shell=True,
          stdout=subprocess.PIPE,
          stderr=subprocess.STDOUT,
      )
      return process.communicate()[0].decode("utf-8").splitlines()
  
file_path: arrow/cpp/build-support/iwyu/iwyu_tool.py
imports: import os
  import sys
  import json
  import argparse
  import subprocess
  import re
  import logging
label_desc: Use image node_id 3 for calling a global function with example usage: get_output(cwd, command) and returns: process