code: def get_links(self, dataset, state, backward=False):
          
          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 []
docs: Raises
          ------
          ValueError
              If backward == `True` and self.backward is `None`.