code: def link(self):
          
          if self.source in self.registry:
              links = self.registry[self.source]
              params = {
                  k: v for k, v in self.get_param_values() if k != 'name'}
              for link in links:
                  link_params = {
                      k: v for k, v in link.get_param_values() if k != 'name'}
                  if (type(link) is type(self) and link.source is self.source
                      and link.target is self.target and params == link_params):
                      return
              self.registry[self.source].append(self)
          else:
              self.registry[self.source] = [self]
docs: Registers the Link