How to transfer the predicates of one node to another node?

Welcome @zzl221000
There is a solution available for a very similar problem here. It has an example as well. Please review.