@staticmethod<EOL><INDENT>def _url_to_prefix(node, id):<DEDENT>
prefixes = {v: k for k, v in node.nsmap.items()}<EOL>ret = re.search('<STR_LIT>', id)<EOL>if ret:<EOL><INDENT>if ret.group(<NUM_LIT:1>) in prefixes:<EOL><INDENT>if prefixes[ret.group(<NUM_LIT:1>)] is None:<EOL><INDENT>return ret.group(<NUM_LIT:2>)<EOL><DEDENT>else:<EOL><INDENT>return prefixes[ret.group(<NUM_LIT:1>)] + '<STR_LIT::>' + ret.group(<NUM_LIT:2>)<EOL><DEDENT><DEDENT><DEDENT>return id<EOL>
_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.