The reason why DT is throwing Exception because the function pyRemoveDuplicatesFromPageList doesn't have any return type. Follow the below steps to copy the data into New Property after removing the duplicates from Page List
1. Set Param.RemoveDuplicates = @pyRemoveDuplicatesFromPageList(pyWorkPage,"OldAccountsList","AccountNumber")
2. Use AppendTo Method .NewAccountsList and Select the Relation as "For EachPage In" and Source as .OldAccountsList
Based on the error it is trying to find the valid function. As there is no valid rule set and library associated with the function it is throwing that error. Generally we will get this error if we copy past the function. Can you please try selecting the function and providing the parameters by using expression builder.