import hou
selectedItems = hou.selectedItems()
num = len(selectedItems)
if num == 1:
select = selectedItems[0]
parent = select.parent()
aw = parent.createNode("attribwrangle")
vex = '''float val = fit(@ptnum,0,@numpt,0,1); float result = chramp("rampName",val);'''
aw.parm('snippet').set(vex)
aw.setInput(0,select)
for node in hou.node(parent.path()).glob("*"):
node.moveToGoodPosition()