def _get_cpv(cp, installed=True):
    if installed:
        return _get_portage().db[portage.root]['vartree'].dep_bestmatch(cp)
    else:
        return _porttree().dep_bestmatch(cp)
add version to category/package
dataset/ETHPy150Open saltstack/salt/salt/modules/portage_config.py/_get_cpv