Please limit yourself to a single topic per issue.
I gave an example of how I would tackle the problem there, and will reiterate here in more detail since I just closed your other topic for you.
Get all walls
Get the walls direction.
Normalize them.
Rotate them 180 degrees as needed so they are contained in quadrant 1 or 2 (no negative Y values).
Group each wall by these vectors.
Get the geometry for each wall.
Get the distance from each wall geometry to each other wall geometry.
If the distance was 0, then join the walls as shown above, otherwise do nothing.
If you also need to join the perpendicular walls, skip the vector bits.
Another option would be to just let the warnings occur, then use a second graph to select all join warning combinations (archilab has nodes that can help here), and unjoin them.
Also, consider using parts in the future as that would save you a lot of headache.