Weired python node behavior

I’m trying to build a python code to generate a rectangular pattern, simply writing a class and defined a method to return two different sets of rectangles, and make one of them staggered.
I noticed that the python node somehow duplicates the grid. when I delete one of the instances, it works as expected.
Please, have a look at the dyn file and the attached images.

pattern.dyn (7.3 KB)

Really not a python expert, but I ran into the following issue:
list_a = list_b does not COPY the list, but instead creates a reference / link. If you want to copy a list to another, you have to use copy(). Does your problem go away when you use copy?
Cheers,
GG