Modifiing interpolation feature from its part object


I would like to modify interpolation maxt() value when the function returns only part reference for interpolation. Somehow like this:

from salome.shaper import model

def make_interpolation():
    partSet = model.moduleDocument()
    part = model.addPart(partSet)
    part_document = part.document()
    model.addInterpolation(part_document, "t","t*t","0", 0, 10, 100)
    return part

part = make_interpolation()

But the last line is not working, can anyone with better programing skills give an advice how I shoud do this?