Deepcopy prev_rec variable