insertNodeWithPathTime_ Does the method no longer work in glyphs2

insertNodeWithPathTime_ The method can insert points in glyphs3 and plugins, but points cannot be inserted in the macro panel of glyphs2. Why is this the same code?

for thisPath in Layer.paths:	
	for thisNode in thisPath.nodes[::-1]:
		if thisNode.type == LINE:
				segmentCorners = 3
				for i in range(1, segmentCorners+1):
					output = 1 / (segmentCorners + 1 - i)
					pathTime = thisNode.index+(output)

The problem is with the integer math in this line:

output = 1 / (segmentCorners + 1 - i)

in python3, that will give floating point numbers but in python2, it will result in an integer.
so you need to change it to this:

output = 1.0 / (segmentCorners + 1.0 - i)

thanks very much