<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def write_snapshots(G, path, delimiter=' ', encoding='utf-8'):
 """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 """

    for line in generate_snapshots(G, delimiter):
        line += '\n'
        path.write(line.encode(encoding))