code: def make_env(gym_id, seed, **kwargs):
      def thunk():
          env = gym.make(gym_id, disable_env_checker=True, **kwargs)
          env._max_episode_steps = 20
          if seed == 1:
              env = gym.wrappers.RecordVideo(
                  env, "videos", step_trigger=lambda x: x % 100 == 0
              )
          return env
  
      return thunk
  
file_path: gym/tests/wrappers/test_record_video.py
imports: import os
  import shutil
  import gym
  from gym.wrappers import capped_cubic_video_schedule
label_desc: Use image node_id 4 for calling a global function with example usage: make_env(gym_id, seed) and returns: thunk, env