def METHOD_NAME(n, fd):
    if fd.isSetMath():
        print("FunctionDefinition " + str(n) + ", " + fd.getId())
        math = fd.getMath()
        # Print function arguments.
        if math.getNumChildren() > 1:
            print("(" + (math.getLeftChild()).getName())
            for n in range (1, math.getNumChildren()):
                print(", " + (math.getChild(n)).getName())
        print(") := ")
        # Print function body.
        if math.getNumChildren() == 0:
            print("(no body defined)")
        else:
            math = math.getChild(math.getNumChildren() - 1)
            formula = formulaToString(math)
            print(formula + "\n")