def METHOD_NAME(self, key: GSVarType, callbacks: Union[Callable, List[Callable]]):
    """
    Connects one or more callbacks for state variable.
    Callbacks are called (triggered) whenever the state is changed, i.e.,
    when the value for some key is set either (i) initially or (ii) to
    a different value than the current value.
    This is analogous to connecting a function to a Qt slot.
    Callback should take a single arg, which will be the current (new)
    value of whatever state var is triggering the callback.
    """
    if callable(callbacks):
        self._connect_callback(key, callbacks)
    else:
        for callback in callbacks:
            self._connect_callback(key, callback)