anybody scripting skilled how to restrict frame range for multiple F-curves at once? I have lots of f-curves (~100) cycle modifier applied to and I want to restrict same frame range for all of them simultaneously. how would the simple script looks like to do the action? it's pain to restrict same frame range for all curves manually. thank u guys in advance!
here it is working just fine:

import bpy

def mission1(obj):
if obj.animation_data is None or obj.animation_data.action is None:
    return

action = obj.animation_data.action

for fc in action.fcurves:
    print(fc.data_path)
    for mod in fc.modifiers:
        if mod.type == 'CYCLES':
            mod.frame_end = 303           
        mod.use_restricted_range = True

for obj in bpy.context.selected_objects:
mission1(obj)