def Subscribe(self, callback, one_shot=False):
    if callback is None or not callable(callback):
      raise Exception("callback can not be None")

    if one_shot:
      if not self._one_shot_callbacks:
        self._one_shot_callbacks = set()
      self._one_shot_callbacks.add(callback)
    else:
      if not self._callbacks:
        self._callbacks = set()
      self._callbacks.add(callback)
Subscribe to notifications of the value changing.
dataset/ETHPy150Open steveniemitz/scales/scales/observable.py/Observable.Subscribe