code: def add_edge(self, start, end, **kwargs):
          try:
              if len(start) != 2 or len(end) != 2:
                  raise ValueError('Nodes must be of type (node, time_slice).')
              elif not isinstance(start[1], int) or not isinstance(end[1], int):
                  raise ValueError('Nodes must be of type (node, time_slice).')
              elif start[1] == end[1]:
                  start = (start[0], 0)
                  end = (end[0], 0)
              elif start[1] == end[1] - 1:
                  start = (start[0], 0)
                  end = (end[0], 1)
              elif start[1] > end[1]:
                  raise NotImplementedError('Edges in backward direction are not allowed.')
              elif start[1] != end[1]:
                  raise ValueError("Edges over multiple time slices is not currently supported")
          except TypeError:
              raise ValueError('Nodes must be of type (node, time_slice).')
          if start == end:
              raise ValueError('Self Loops are not allowed')
          elif start in super(DynamicBayesianNetwork, self).nodes() and end \
                  in super(DynamicBayesianNetwork, self).nodes() and \
                  nx.has_path(self, end, start):
              raise ValueError('Loops are not allowed. Adding the edge from ({start} --> {end}) forms a loop.'.format(
                  start=str(start), end=str(end)))
          super(DynamicBayesianNetwork, self).add_edge(start, end, **kwargs)
          if start[1] == end[1]:
              super(DynamicBayesianNetwork, self).add_edge((start[0], 1 - start[1]), (end[0], 1 - end[1]))
          else:
              super(DynamicBayesianNetwork, self).add_node((end[0], 1 - end[1]))