docs: def replace_namespace_with_prefix(tag_str, ns_reverse_dict=None):
      """Convert XML tag names with namespace on the form ``{namespace}tag`` to form
      ``prefix:tag``.
  
      Args:
        tag_str: str
          Tag name with namespace. E.g.:
          ``{http://www.openarchives.org/ore/terms/}ResourceMap``.
  
        ns_reverse_dict : dict
          A dictionary of namespace to prefix to use for the conversion. If not supplied, a
          default dict with the namespaces used in DataONE XML types is used.
  
      Returns:
        str: Tag name with prefix. E.g.: ``ore:ResourceMap``.
  
      """
      ns_reverse_dict = ns_reverse_dict or NS_REVERSE_DICT
      for namespace_str, prefix_str in ns_reverse_dict.items():
          tag_str = tag_str.replace(
              '{{{}}}'.format(namespace_str), '{}:'.format(prefix_str)
          )
      return tag_str