human
Complete this python program:
def copy(from_volume, to_volume):
assistant
#Here is the Python program you requested.

    """Copy contents of one volume to another.
    :param Volume from_volume: Volume to read from.
    :param Volume to_volume: Volume to write to.
    """
    from_filesystem = from_volume.get_filesystem()
    to_filesystem = to_volume.get_filesystem()
    getting_snapshots = to_filesystem.snapshots()
    def got_snapshots(snapshots):
        with from_filesystem.reader(snapshots) as reader:
            with to_filesystem.writer() as writer:
                for chunk in iter((lambda : reader.read(4096)), ''):
                    writer.write(chunk)
    getting_snapshots.addCallback(got_snapshots)
    return getting_snapshots