def RegisterWatch(self, znode=None, action=None, pipe_stdin=None,
                    run_on_load=None, run_mode=None, description=None,
                    uid=None, gid=None, watch_type=None, notify_signal=None,
                    timeout=None):
    assert type(znode) == types.StringType, (
        'RegisterWatch: znode must be a string.')
    assert (type(action) == types.FunctionType or
            type(action) == types.UnboundMethodType or
            type(action) == types.LambdaType), (
        'RegisterWatch: action must be a function, method or lambda.')
    assert pipe_stdin is None or type(pipe_stdin) == types.BooleanType, (
        'RegisterWatch: pipe_stdin must be one of True or False.')
    assert run_on_load is None or type(run_on_load) == types.BooleanType, (
        'RegisterWatch: run_on_load must be one of True of False.')
    assert (run_mode is None or run_mode is core.QUEUE or
            run_mode is core.PARALLEL or run_mode is core.DISCARD), (
        'RegisterWatch: run_mode is not one of QUEUE, PARALLEL or DISCARD.')
    assert description is None or type(description) == types.StringType, (
        'RegisterWatch: Description must be a string.')
    assert (uid is None or
            type(uid) == types.IntType or
            type(uid) == types.StringType), (
        'RegisterWatch: uid must be a number of a string.')
    assert (gid is None or
            type(gid) == types.IntType or
            type(gid) == types.StringType), (
        'RegisterWatch: gid must be a number of a string.')
    assert (watch_type is None or watch_type is core.WATCH_DATA or
            watch_type is core.WATCH_CHILDREN), (
        'RegisterWatch: watch_type is not one of WATCH_DATA or WATCH_CHILDREN')
    assert (notify_signal is None or
            (type(notify_signal) == types.IntType and
             notify_signal > 0 and notify_signal < 32)), (
        'RegisterWatch: notify_signal must be an int below 32.')
    assert (timeout is None or
            type(timeout) == types.IntType or
            type(timeout) == types.FloatType), (
        'RegisterWatch: timeout must be a number.')

    if description is None:
      description = '%s-%s' % (self._config_file, len(self._configurations) + 1)

    kwargs = {}
    kwargs['description'] = description
    if pipe_stdin is not None:
      kwargs['pipe_stdin'] = pipe_stdin
    if run_on_load is not None:
      kwargs['run_on_load'] = run_on_load
    if run_mode is not None:
      kwargs['run_mode'] = run_mode
    if uid is not None:
      kwargs['uid'] = uid
    if gid is not None:
      kwargs['gid'] = gid
    if notify_signal is not None:
      kwargs['notify_signal'] = notify_signal
    if timeout is not None:
      kwargs['timeout'] = timeout

    if watch_type is core.WATCH_CHILDREN:
        config = core.TwitcherChildrenObject(znode, action, **kwargs)
    else:
        config = core.TwitcherObject(znode, action, **kwargs)
    self._configurations.append(config)
Registers a watch and action on a given znode.
dataset/ETHPy150Open liquidgecka/twitcher/twitcher/config.py/_NamespaceConfig.RegisterWatch