Assign a support with Python to an existing Analytical Node in Dynamo

Hi, I am new with the Python-Dynamo-Robot RSA combo so apologies if the question is too trivial.

I am trying to just assign some restraints, whit a Python Script, to an analytical node I have created in Dynamo.

I think I am at the stage where I am still quite confused with basic stuff so apologies in advance the code is shown below:

import clr
clr.AddReference(r’C:\Program Files\Autodesk\Autodesk Robot Structural Analysis Professional 2022\Exe\Interop.RobotOM.dll’)

from RobotOM import *

robapp = RobotApplicationClass()
project = robapp.Project
struc = project.Structure
node = struc.Nodes
bar = struc.Bars
labels = struc.Labels

Grab the nodes to apply the restraints

TL_node= IN[0]
RL_node = IN[1]

Create the label of support type

sup = labels.Create(IRobotLabelType.I_LT_NODE_SUPPORT, “lateral_retraint”)
supData = IRobotNodeSupportData(sup.Data)
supData.UX = 1
supData.UY = 1
labels.Store(sup)

Apply the lateral restraint created to the nodes

TL_node.SetLabel(I_LT_NODE_SUPPORT, “lateral_restraint”)
RL_node.SetLabel(I_LT_NODE_SUPPORT, “lateral_restraint”)

Could someone help me with this? Thank you