def get_modelseed_comps(kb_db, model_ids):
    """Get MongoIDs from KBase database for compounds in model(s)."""
    comp_ids, _ids = set(), set()
    for model_id in model_ids:
        comp_ids = kb_db.models.find_one({'_id': model_id}, {'Compounds': 1})[
            'Compounds']
        for comp_id in comp_ids:
            comp_ids.add(comp_id)
    for comp_id in comp_ids:
        comp_id = int(comp_id.split('.')[1])
        for comp in kb_db.compounds.find({'Model_SEED': comp_id}, {'_id': 1}):
            _ids.add(comp['_id'])
    return _ids
