Console runs script that transform doesn't

deepcopy doesn't "know" how Perspective's internal objects work; it's a bigger hammer than you need.

Try the code in this post to directly convert to 'native' list and dict objects: