code: def _log_error(process):
      """This method takes in Popen process and logs the error of that process.
  
      Returns those logs as a string
      """
  
      error_logs = ""
      with process.stderr as pipe:
          for line in iter(pipe.readline, b""):
              error_str = str(line, "UTF-8")
              if "ERROR:" in error_str:
                  logger.error(error_str)
              else:
                  logger.warning(error_str)
              error_logs = error_logs + error_str
  
      return error_logs
  
imports: from __future__ import absolute_import
  import logging
  import sys
  import shlex
  import os
  import subprocess
  import time
  import dataclasses
  import json
label_desc: Use image node_id 6 for calling a global function with example usage: _log_error(process) and returns: error_logs