modifying fcurve modifiers in python?

I’ve been able to assign an fcurve modifier to to fcurves in my scripts, but I can’t figure out how to modify them once created.

here’s what the info panel spits out when I do it manually:

    bpy.ops.graph.fmodifier_add(type='LIMITS')              #creates fcurve mod
    bpy.data.node_groups["Shader Nodetree"].(null) = True        #"maximum y" set to true
    bpy.data.node_groups["Shader Nodetree"].(null) = 0            #"maximum y" value set to 0
    bpy.data.node_groups["Shader Nodetree"].(null) = True        #"use influence" set to true
    bpy.data.node_groups["Shader Nodetree"].(null) = 0.5          #"use influence" set to 0.5

clearly this won’t work in a script as is. what is the correct syntax for what I am doing?