def mod_watch(name, **kwargs):
    sfun = kwargs.pop('sfun', None)
    mapfun = {'purged': purged,
              'latest': latest,
              'removed': removed,
              'installed': installed}
    if sfun in mapfun:
        return mapfun[sfun](name, **kwargs)
    return {'name': name,
            'changes': {},
            'comment': 'pkg.{0} does not work with the watch requisite'.format(sfun),
            'result': False}
Install/reinstall a package based on a watch requisite
dataset/ETHPy150Open saltstack/salt/salt/states/pkg.py/mod_watch