code: def subprocess_call(cmd, logger="bar"):
      """Executes the given subprocess command.
  
      Set logger to None or a custom Proglog logger to avoid printings.
      """
      logger = proglog.default_bar_logger(logger)
      logger(message="MoviePy - Running:\n>>> " + " ".join(cmd))
  
      popen_params = cross_platform_popen_params(
          {"stdout": sp.DEVNULL, "stderr": sp.PIPE, "stdin": sp.DEVNULL}
      )
  
      proc = sp.Popen(cmd, **popen_params)
  
      out, err = proc.communicate()  # proc.wait()
      proc.stderr.close()
  
      if proc.returncode:
          logger(message="MoviePy - Command returned an error")
          raise IOError(err.decode("utf8"))
      else:
          logger(message="MoviePy - Command successful")
  
      del proc
  
file_path: moviepy/moviepy/tools.py
imports: import os
  import subprocess
  import warnings
  import proglog
label_desc: Use image node_id 2 for calling a global function with example usage: subprocess_call(cmd, logger) without return types