code: def _get_final_set(self, sets, pk, sort_options):
          if self._lazy_collection['intersects']:
              sets = sets[::]
              sets.extend(self._lazy_collection['intersects'])
              if not self._lazy_collection['sets'] and not self.stored_key:
                  sets.append(self.cls.get_field('pk').collection_key)
          final_set, keys_to_delete_later = super(ExtendedCollectionManager,
                                      self)._get_final_set(sets, pk, sort_options)
          if final_set and self._sort_by_sortedset_before:
              base_tmp_key, tmp_keys = self._prepare_sort_by_score(None, sort_options)
              if not keys_to_delete_later:
                  keys_to_delete_later = []
              keys_to_delete_later.append(base_tmp_key)
              keys_to_delete_later += tmp_keys
          return final_set, keys_to_delete_later