code: def link_version(self, source, target):
          
          if not hasattr(target, VERSION_ID):
              # no initial version of this object!
              logger.warn("No iniatial version found for '{}'"
                          .format(repr(target)))
              return
  
          if not hasattr(source, REFERENCE_VERSIONS):
              source.reference_versions = {}
  
          target_uid = api.get_uid(target)
          # store the current version of the target on the source
          source.reference_versions[target_uid] = target.version_id
          # persist changes that occured referenced versions
          source._p_changed = 1
docs: Link the current version of the target on the source