code: def write_snapshots(G, path, delimiter=' ', encoding='utf-8'):
      
      for line in generate_snapshots(G, delimiter):
          line += '\n'
          path.write(line.encode(encoding))
docs: Write a DyNetx graph in snapshot graph list format.
  
  
          Parameters
          ----------
  
          G : graph
              A DyNetx graph.
  
          path : basestring
              The desired output filename
  
          delimiter : character
              Column delimiter