def _url_to_prefix(node, id):
        '''_url_to_prefix

        Low-level api: Convert an identifier from `{namespace}tagname` notation
        to `prefix:tagname` notation by looking at nsmap of the node. If the
        identifier does not have a namespace, the identifier is simply returned
        without modification.

        Parameters
        ----------

        node : `str`
            A config node. Its identifier will be converted.

        id : `str`
            Identifier in `{namespace}tagname` notation.

        Returns
        -------

        str
            Identifier in `prefix:tagname` notation.
        '''

        prefixes = {v: k for k, v in node.nsmap.items()}
        ret = re.search('^{(.+)}(.+)$', id)
        if ret:
            if ret.group(1) in prefixes:
                if prefixes[ret.group(1)] is None:
                    return ret.group(2)
                else:
                    return prefixes[ret.group(1)] + ':' + ret.group(2)
        return id
_url_to_prefix

        Low-level api: Convert an identifier from `{namespace}tagname` notation
        to `prefix:tagname` notation by looking at nsmap of the node. If the
        identifier does not have a namespace, the identifier is simply returned
        without modification.

        Parameters
        ----------

        node : `str`
            A config node. Its identifier will be converted.

        id : `str`
            Identifier in `{namespace}tagname` notation.

        Returns
        -------

        str
            Identifier in `prefix:tagname` notation.