code: def indent_xml(elem, level=0) -> None:
      """Indents and newlines the XML for better output."""
      indent_str = "\n" + level * "  "
      if len(
          elem
      ):  # pylint: disable=g-explicit-length-test  # `if elem` not valid
          if not elem.text or not elem.text.strip():
              elem.text = indent_str + "  "
          if not elem.tail or not elem.tail.strip():
              elem.tail = indent_str
          for elem in elem:
              indent_xml(elem, level + 1)
          if not elem.tail or not elem.tail.strip():
              elem.tail = indent_str
      else:
          if level and (not elem.tail or not elem.tail.strip()):
              elem.tail = indent_str
  
file_path: tensorflow/ci/official/utilities/extract_resultstore_links.py
imports: import argparse
  import datetime
  import os
  import re
  from typing import Dict, Union
  import xml.etree.ElementTree
label_desc: Use image node_id 3 for calling a global function with example usage: indent_xml(elem, level) without return types