code: def interactions_iter(self, nbunch=None, t=None):
          
          seen = {}  # helper dict to keep track of multiply stored interactions
          if nbunch is None:
              nodes_nbrs = self._adj.items()
          else:
              nodes_nbrs = ((n, self._adj[n]) for n in self.nbunch_iter(nbunch))
  
          for n, nbrs in nodes_nbrs:
              for nbr in nbrs:
                  if t is not None:
                      if nbr not in seen and self.__presence_test(n, nbr, t):
                          yield (n, nbr, {"t": [t]})
                  else:
                      if nbr not in seen:
                          yield (n, nbr, self._adj[n][nbr])
                  seen[n] = 1
          del seen
docs: Return an iterator over the interaction present in a given snapshot.
  
          Edges are returned as tuples
          in the order (node, neighbor).
  
          Parameters
          ----------
          nbunch : iterable container, optional (default= all nodes)
              A container of nodes.  The container will be iterated
              through once.
          t : snapshot id (default=None)
              If None the the method returns an iterator over the edges of the flattened graph.
  
          Returns
          -------
          edge_iter : iterator
              An iterator of (u,v) tuples of interaction.
  
          See Also
          --------
          interaction : return a list of interaction
  
          Notes
          -----
          Nodes in nbunch that are not in the graph will be (quietly) ignored.
          For directed graphs this returns the out-interaction.
  
          Examples
          --------
          >>> G = dn.DynGraph()
          >>> G.add_path([0,1,2], 0)
          >>> G.add_interaction(2,3,1)
          >>> [e for e in G.interactions_iter(t=0)]
          [(0, 1), (1, 2)]
          >>> list(G.interactions_iter())
          [(0, 1), (1, 2), (2, 3)]