Ways to convert revit.db.wall to revit.elements.wall?

Greetings everyone.
I need to join the walls I just created using the JoinGeometry function inside a Python script. But these walls are of type revit.db.wall, so they do not have a JoinGeometry method. If I pass these walls to another Python node without “Unwraping” them however their type changes to revit.elements.wall and then Join works completely fine. But I need all processes to be in the same Python node.
So how can I do this kind of conversion? It seems I’m missing something obvious.
Thank you in advance!

Nvm. I figured it out.

Can you post how?

Sure.
As I thought, the solution was obvious. Conversion can be done using Element wrapper.

#Code example:

import clr
clr.AddReference('RevitNodes')
import Revit

wall = UnwrapElement(IN[0])

wall = Revit.Elements.ElementWrapper.ToDSType(wall, True)