code: def make_action_filtered(env, action_filter):
      old_step = env.step
  
      def step(action):
          return old_step(action_filter(action))
  
      env.step = step
  
imports: import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: make_action_filtered(env, action_filter) and returns: old_step