docs: def create_element_tree(elem_or_name=None, text=None, **attribute_kwargs):
      """
      Creates an ElementTree from elem_or_name, updated it with text and attributes.
      If elem_or_name is None, a permanently empty ElementTree is returned.
      :param elem_or_name: an Element or the name of the root element tag
      :param text: optional text with which to update the root element
      :param attribute_kwargs: optional attributes to add to the root element
      :return: a new ElementTree with the specified root and attributes
      """
  
      if elem_or_name is None:
          return ElementTree()
  
      is_elem = isinstance(elem_or_name, ElementType)
      element = elem_or_name if is_elem else Element(elem_or_name)
  
      if text is not None:
          element.text = text
  
      element.attrib.update(attribute_kwargs)
  
      return ElementTree(element)