Return all base_version_ids for a symbol that are not bases of version_ids

def _find_base_version_ids(self, symbol, version_ids):
        """
        Return all base_version_ids for a symbol that are not bases of version_ids
        """
        cursor = self._versions.find({'symbol': symbol,
                                      '_id': {'$nin': version_ids},
                                      'base_version_id': {'$exists': True},
                                      },
                                     projection={'base_version_id': 1})
        return [version["base_version_id"] for version in cursor]