Mistakes of getting joined elements

Thanks @Kulkul ! Would you mind sharing the python scripts in the picture? I tried the scrips in How to set "Disallow Join" for Structural Framing using Python? - #3 by Einar_Raknes but it always showed that name 'UnwrapElement' is not defined