def _create_link(self, act_node, name, instance):
act_node._links[name] = instance<EOL>act_node._children[name] = instance<EOL>full_name = instance.v_full_name<EOL>if full_name not in self._root_instance._linked_by:<EOL><INDENT>self._root_instance._linked_by[full_name] = {}<EOL><DEDENT>linking = self._root_instance._linked_by[full_name]<EOL>if act_node.v_full_name not in linking:<EOL><INDENT>linking[act_node.v_full_name] = (act_node, set())<EOL><DEDENT>linking[act_node.v_full_name][<NUM_LIT:1>].add(name)<EOL>if name not in self._links_count:<EOL><INDENT>self._links_count[name] = <NUM_LIT:0><EOL><DEDENT>self._links_count[name] = self._links_count[name] + <NUM_LIT:1><EOL>self._logger.debug('<STR_LIT>'<EOL>'<STR_LIT>' % (name, act_node.v_full_name,<EOL>instance.v_full_name))<EOL>return instance<EOL>
Creates a link and checks if names are appropriate