code: def indent(elem, level=0):
      i = "\n" + level * "  "
      if len(elem):
          if not elem.text or not elem.text.strip():
              elem.text = i + "  "
          if not elem.tail or not elem.tail.strip():
              elem.tail = i
          for elem in elem:
              indent(elem, level + 1)
          if not elem.tail or not elem.tail.strip():
              elem.tail = i
      else:
          if level and (not elem.tail or not elem.tail.strip()):
              elem.tail = i
  
imports: import os
  import re
  import uuid
  from xml.etree import ElementTree
  from traitlets import Bool, Enum, Instance, Integer, List, Unicode
  from traitlets.config.configurable import Configurable
label_desc: Use image node_id 2 for calling a global function with example usage: indent(elem, level) without return types