class NodeClass(Base):
    __tablename__ = 'nodes_table'
node_id = Column(Integer, primary_key=True)
left_id = Column(Integer, ForeignKey('nodes_table.node_id'))
right_id = Column(Integer, ForeignKey('nodes_table.node_id'))
Using SQLAlchemy with multiple self-referential foreign keys