def METHOD_NAME(self,
                    frames: Dict[int, np.ndarray],
                    fps=20,
                    save_dir='/tmp') -> str:
    """
    Compresses the data by converting a set of individual frames to a single video.
    """
    file_path = os.path.join(save_dir, f"{uuid4()}.mp4")
    out = None
    for key in frames.keys():
        frame = frames[key]
        if out is None:
            out = cv2.VideoWriter(file_path,
                                  cv2.VideoWriter_fourcc(*'MP4V'), fps,
                                  frame.shape[:2])
        out.write(frame)
    if out is None:
        return
    out.release()
    return file_path