code: def add_star(G, nodes, t, **attr):
      
      nlist = iter(nodes)
      v = next(nlist)
      edges = ((v, n) for n in nlist)
      G.add_interactions_from(edges, t, **attr)
docs: Add a star at time t.
  
              The first node in nodes is the middle of the star.  It is connected
              to all other nodes.
  
              Parameters
              ----------
              G : graph
                  A DyNetx graph
  
              nodes : iterable container
                  A container of nodes.
  
              t : snapshot id (default=None)
                  snapshot id
  
              See Also
              --------
              add_path, add_cycle
  
              Examples
              --------
              >>> G = dn.DynGraph()
              >>> dn.add_star(G, [0,1,2,3], t=0)