code: def crop_fn_frame_folder(
      input_path,
      output_path,
      t1,
      t2,
      in_fps=None,
      frame_reader=None,
      symlink=True,
      copy_names=True,
      copy_frames=True,
  ):
      if in_fps is None and frame_reader is None:
          raise ValueError("Both in_fps and frame_reader can't be None")
  
      if frame_reader is None:
          frame_reader = VideoSortedFolderReader(input_path, fps=in_fps)
  
      start_time, end_time = t1, t2
  
      ts = start_time
      image_ext = frame_reader.get_image_ext()
  
      output_path = Path(output_path)
      output_path.mkdir(exist_ok=True)
      for frame_idx, (frame, ts) in enumerate(
          frame_reader.iter_frame_ts(ts)
      ):
          if ts > end_time:
              break
  
          frame_path = frame_reader.get_frame_path()
          if copy_names:
              im_filename = Path(frame_path).name
          else:
              # 6 digits is about 9 hours of video at 30 fps
              im_filename = f"{frame_idx:06}" + image_ext
          im_out_path = Path(output_path, im_filename)
          if symlink:
              os.symlink(frame_path, im_out_path)
          elif copy_frames:
              call(["cp", frame_path, im_out_path])
          else:
              frame.save(im_out_path)
  
      return True
  
imports: import glob
  import numpy
  import os
  import re
  import tempfile
  from addict import Dict
  from collections import defaultdict
  from pathlib import Path
  from subprocess import call
  import cv2
  from ..dataset import GluonCVMotionDataset, DataSample, FieldNames, get_resized_video_location
  from ..io.video_io import VideoFrameReader, VideoSortedFolderReader, cmd_with_addn_args, FFMPEG_FOURCC
label_desc: Use image node_id 8 for calling a global function with example usage: crop_fn_frame_folder(input_path, output_path, t1, t2, in_fps, frame_reader, symlink, copy_names, copy_frames) and returns: True