def watch(self, key, criteria, callback):
        if hasattr(criteria, '__call__'):
            pred = criteria
        else:
            pred = lambda incoming: _match_criteria(criteria, incoming)
        with self._watches_lock:
            self._watches[key] = (pred, callback)

# others can add in implementations here
Number of elements in array
dataset/ETHPy150Open cemerick/nrepl-python-client/nrepl/__init__.py/WatchableConnection.watch--crossover with--dataset/ETHPy150Open dask/dask/dask/array/core.py/Array.size