docs: def replace_by_etree(self, root_el, el_idx=0):
          """Replace element.
  
          Select element that has the same name as ``root_el``, then replace the selected
          element with ``root_el``
  
          ``root_el`` can be a single element or the root of an element tree.
  
          Args:
            root_el : element
              New element that will replace the existing element.
  
          """
          el = self.get_element_by_name(root_el.tag, el_idx)
          el[:] = list(root_el)
          el.attrib = root_el.attrib