code: def run_subprocess(command, return_code=False, **kwargs):
      """Run command in subprocess and return stdout and stderr.
      Raise CalledProcessError if the process returned non-zero.
      """
      use_kwargs = dict(stderr=subprocess.PIPE, stdout=subprocess.PIPE)
      use_kwargs.update(kwargs)
  
      p = subprocess.Popen(command, **use_kwargs)
      stdout, stderr = p.communicate()
      output = (stdout or b"").decode("utf-8"), (stderr or b"").decode(
          "utf-8"
      )
      if p.returncode:
          print(output[0], output[1])
          raise subprocess.CalledProcessError(
              p.returncode, command, output
          )
      return output
  
file_path: imageio/tests/test_meta.py
imports: from __future__ import print_function
  import os
  import sys
  import subprocess
  from pytest import raises
  import imageio
label_desc: Use image node_id 1 for calling a global function with example usage: run_subprocess(command, return_code) and returns: output