docs: def _execute_install_command(cmd, parse_output, errors, parsed_packages):
      '''
      Executes a command for the install operation.
      If the command fails, its error output will be appended to the errors list.
      If the command succeeds and parse_output is true, updated packages will be appended
      to the parsed_packages dictionary.
      '''
      out = __salt__['cmd.run_all'](
          cmd,
          output_loglevel='trace',
          python_shell=False
      )
      if out['retcode'] != 0:
          if out['stderr']:
              errors.append(out['stderr'])
          else:
              errors.append(out['stdout'])
      elif parse_output:
          parsed_packages.update(_parse_reported_packages_from_install_output(out['stdout']))