code: def _run(cmd, suppress_errors=False, suppress_output=False):
      
      if is_verbose():
          logger.debug('Executing: "%s"', format(cmd))
      process = subprocess.Popen(
          cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  
      stderr_log_level = logging.NOTSET if suppress_errors else logging.ERROR
      stdout_log_level = logging.NOTSET if suppress_output else logging.DEBUG
  
      stdout_thread = PipeReader(
          process.stdout, process, logger, stdout_log_level)
      stderr_thread = PipeReader(
          process.stderr, process, logger, stderr_log_level)
  
      stdout_thread.start()
      stderr_thread.start()
  
      while process.poll() is None:
          time.sleep(PROCESS_POLLING_INTERVAL)
  
      stdout_thread.join()
      stderr_thread.join()
  
      process.aggr_stdout = stdout_thread.aggr
      process.aggr_stderr = stderr_thread.aggr
  
      return process
docs: Execute a command