docs: def etree_replace_namespace(etree_obj, ns_str):
      """In-place change the namespace of elements in an ElementTree.
  
      Args:
        etree_obj: ElementTree
  
        ns_str : str
          The namespace to set. E.g.: ``http://ns.dataone.org/service/types/v1``.
  
      """
  
      def _replace_recursive(el, n):
          el.tag = re.sub(r'{.*\}', '{{{}}}'.format(n), el.tag)
          el.text = el.text.strip() if el.text else None
          el.tail = el.tail.strip() if el.tail else None
          for child_el in el:
              _replace_recursive(child_el, n)
  
      _replace_recursive(etree_obj, ns_str)