def METHOD_NAME(
    min_labels_slp: Labels,
    min_labels_slp_path: Labels,
    small_robot_mp4_vid: Video,
    format: str,
    tmpdir,
):
    labels = min_labels_slp
    slp_path = PurePath(min_labels_slp_path)
    tmpdir = PurePath(tmpdir)
    def generate_filenames(paths, format="analysis"):
        output_paths = [path for path in paths]
        # Generate filenames if user has not specified (enough) output filenames
        labels_path = str(slp_path)
        fn = re.sub("(\\.json(\\.zip)?|\\.h5|\\.slp)$", "", labels_path)
        fn = PurePath(fn)
        out_suffix = "nix" if "nix" in format else "h5"
        default_names = [
            default_analysis_filename(
                labels=labels,
                video=video,
                output_path=str(fn.parent),
                output_prefix=str(fn.stem),
                format_suffix=out_suffix,
            )
            for video in labels.videos[len(paths) :]
        ]
        output_paths.extend(default_names)
        return output_paths
    def assert_analysis_existance(output_paths: list, format="analysis"):
        output_paths = generate_filenames(output_paths, format)
        for video, path in zip(labels.videos, output_paths):
            video_exists = Path(path).exists()
            if len(labels.get(video)) == 0:
                assert not video_exists
            else:
                assert video_exists
    def sleap_convert_assert(output_paths, slp_path, format="analysis"):
        output_args = ""
        for path in output_paths:
            output_args += f"-o {path} "
        args = f"--format {format} {output_args}{slp_path}".split()
        sleap_convert(args)
        assert_analysis_existance(output_paths, format)
    # No output specified
    output_paths = []
    sleap_convert_assert(output_paths, slp_path, format)
    # Specify output and retest
    output_paths = [str(tmpdir.with_name("prefix")), str(tmpdir.with_name("prefix2"))]
    sleap_convert_assert(output_paths, slp_path, format)
    # Add video and retest
    labels.add_video(small_robot_mp4_vid)
    slp_path = tmpdir.with_name("new_slp.slp")
    labels.save(filename=slp_path)
    output_paths = [str(tmpdir.with_name("prefix"))]
    sleap_convert_assert(output_paths, slp_path, format)
    # Add labeled frame to video and retest
    labeled_frame = labels.find(video=labels.videos[1], frame_idx=0, return_new=True)[0]
    instance = Instance(skeleton=labels.skeleton, frame=labeled_frame)
    labels.add_instance(frame=labeled_frame, instance=instance)
    labels.append(labeled_frame)
    slp_path = tmpdir.with_name("new_slp.slp")
    labels.save(filename=slp_path)
    output_paths = [str(tmpdir.with_name("prefix"))]
    sleap_convert_assert(output_paths, slp_path, format)