code: def get_versioned_references_for(self, instance):
          
          vrefs = []
  
          # Retrieve the referenced objects
          refs = instance.getRefs(relationship=self.relationship)
  
          ref_versions = getattr(instance, REFERENCE_VERSIONS, None)
          # No versions stored, return the original references
          if ref_versions is None:
              return refs
  
          for ref in refs:
              uid = api.get_uid(ref)
              # get the linked version to the reference
              version = ref_versions.get(uid)
              # append the versioned reference
              vrefs.append(self.retrieve_version(ref, version))
  
          return vrefs
docs: Returns the versioned references for the given instance