code: def output_xml(entries, sorted_list, args):
      root = ET.Element("testsuites")
      testsuite = ET.Element(
          "testsuite",
          attrib={
              "name": "build-time",
              "tests": str(len(sorted_list)),
              "failures": str(0),
              "errors": str(0),
          },
      )
      root.append(testsuite)
      for name in sorted_list:
          entry = entries[name]
          build_time = float(entry[1] - entry[0]) / 1000
          item = ET.Element(
              "testcase",
              attrib={
                  "classname": "BuildTime",
                  "name": name,
                  "time": str(build_time),
              },
          )
          testsuite.append(item)
  
      tree = ET.ElementTree(root)
      xmlstr = minidom.parseString(ET.tostring(root)).toprettyxml(
          indent="   "
      )
      print(xmlstr)
  
file_path: cudf/cpp/scripts/sort_ninja_log.py
imports: import argparse
  import os
  import sys
  import xml.etree.ElementTree
  from pathlib import Path
  from xml.dom import minidom
label_desc: Use image node_id 2 for calling a global function with example usage: output_xml(entries, sorted_list, args) without return types