Raises
        ------
        ValueError
            If backward == `True` and self.backward is `None`.

def get_links(self, dataset, state, backward=False):
        """
        Raises
        ------
        ValueError
            If backward == `True` and self.backward is `None`.
        """
        if backward and self.backward is None:
            raise ValueError('no backward nodes')
        try:
            node = dataset[int(backward)][self.join_state(state)]
            if not isinstance(node[0], list):
                return [(node[0], node[1])]
            return list(zip(*node))
        except KeyError:
            return []