code: def dataframe_from_jxml(run: Iterable) -> pandas.DataFrame:
      """
      Turn a parsed JXML into a pandas dataframe
      """
      fname = []
      tname = []
      status = []
      message = []
      sname = []
      for suite in run:
          for test in suite:
              sname.append(suite.name)
              fname.append(test.classname)
              tname.append(test.name)
              s = "✓"
              result = test.result
  
              if len(result) == 0:
                  status.append(s)
                  message.append("")
                  continue
              result = result[0]
              m = (
                  result.message
                  if result and hasattr(result, "message")
                  else ""
              )
              if isinstance(result, junitparser.Error):
                  s = "x"
              elif isinstance(result, junitparser.Failure):
                  s = "x"
              elif isinstance(result, junitparser.Skipped):
                  s = "s"
              else:
                  s = "x"
              status.append(s)
              message.append(html.escape(m))
      df = pandas.DataFrame(
          {
              "file": fname,
              "test": tname,
              "status": status,
              "message": message,
              "suite_name": sname,
          }
      )
  
      # There are sometimes duplicate tests in the report for some unknown reason.
      # If that is the case, concatenate the messages and prefer to show errors.
      def dedup(group):
          if len(group) > 1:
              if "message" in group.name:
                  return group.str.cat(sep="")
              else:
                  if (group == "x").any(axis=0):
                      return "x"
                  else:
                      return group.iloc[0]
          else:
              return group
  
      return df.groupby(["file", "test"], as_index=False).agg(dedup)
  
imports: from __future__ import annotations
  import argparse
  import contextlib
  import html
  import io
  import os
  import re
  import shelve
  import sys
  import zipfile
  from collections.abc import Iterable, Iterator
  from concurrent.futures import ProcessPoolExecutor
  from typing import Any, cast
  import altair
  import altair_saver
  import junitparser
  import pandas
  import requests
  from requests.adapters import HTTPAdapter
  from urllib3.util.retry import Retry
label_desc: Use image node_id 10 for calling a global function with example usage: dataframe_from_jxml(run) and returns: df, group, group, str, group