code: def execute_command(command):
      
  
      command = shlex.split(command)
      try:
          process = subprocess.Popen(
              command,
              stdin=subprocess.PIPE,
              stdout=subprocess.PIPE,
              stderr=subprocess.PIPE,
          )
      except FileNotFoundError:
          raise RuntimeError("Command not found: {}".format(repr(command)))
      process.wait()
      # TODO: may use another codec to decode
      if process.returncode > 0:
          stderr = process.stderr.read().decode("utf-8")
          raise ValueError("Error executing command: {}".format(repr(stderr)))
      return process.stdout.read().decode("utf-8")
docs: Execute a command and return its output