docs: def _parse_tcpreplay_result(stdout, stderr, argv):
      """
      Parse the output of tcpreplay and modify the results_dict to populate output information.  # noqa: E501
      Tested with tcpreplay v3.4.4
      Tested with tcpreplay v4.1.2
      :param stdout: stdout of tcpreplay subprocess call
      :param stderr: stderr of tcpreplay subprocess call
      :param argv: the command used in the subprocess call
      :return: dictionary containing the results
      """
      try:
          results = {}
          stdout = plain_str(stdout).lower()
          stderr = plain_str(stderr).strip().split("\n")
          elements = {
              "actual": (int, int, float),
              "rated": (float, float, float),
              "flows": (int, float, int, int),
              "attempted": (int,),
              "successful": (int,),
              "failed": (int,),
              "truncated": (int,),
              "retried packets (eno": (int,),
              "retried packets (eag": (int,),
          }
          multi = {
              "actual": ("packets", "bytes", "time"),
              "rated": ("bps", "mbps", "pps"),
              "flows": ("flows", "fps", "flow_packets", "non_flow"),
              "retried packets (eno": ("retried_enobufs",),
              "retried packets (eag": ("retried_eagain",),
          }
          float_reg = r"([0-9]*\.[0-9]+|[0-9]+)"
          int_reg = r"([0-9]+)"
          any_reg = r"[^0-9]*"
          r_types = {int: int_reg, float: float_reg}
          for line in stdout.split("\n"):
              line = line.strip()
              for elt, _types in elements.items():
                  if line.startswith(elt):
                      regex = any_reg.join([r_types[x] for x in _types])
                      matches = re.search(regex, line)
                      for i, typ in enumerate(_types):
                          name = multi.get(elt, [elt])[i]
                          results[name] = typ(matches.group(i + 1))
          results["command"] = " ".join(argv)
          results["warnings"] = stderr[:-1]
          return results
      except Exception as parse_exception:
          if not conf.interactive:
              raise
          log_runtime.error("Error parsing output: " + str(parse_exception))
          return {}