def add_target(self, anchor, id, entry, sig, signode):
        """Add cross-references to self.env.domaindata, if applicable."""
        if anchor not in self.state.document.ids:
            signode['names'].append(anchor)
            signode['ids'].append(anchor)
            signode['first'] = (not self.names)
            self.state.document.note_explicit_target(signode)
            data = self.env.domaindata['http'][self.typ]
            if id in data:
                otherdocname = data[id][0]
                self.env.warn(
                    self.env.docname,
                    'duplicate method description of %s, ' % sig +
                    'other instance in ' +
                    self.env.doc2path(otherdocname) +
                    ', use :noindex: for one of them',
                    self.lineno
                )
            data[id] = entry
dataset/ETHPy150Open deceze/Sphinx-HTTP-domain/sphinx_http_domain/directives.py/HTTPDescription.add_target/original