def METHOD_NAME(labels_path, video_path, max_instances, frames):
    inference_task = runners.InferenceTask(
        trained_job_paths=["model1", "model2"],
        inference_params={"tracking.tracker": "simple", "max_instances": max_instances},
    )
    item_for_inference = runners.VideoItemForInference(
        video=Video.from_filename(video_path), frames=frames, labels_path=labels_path
    )
    cli_args, output_path = inference_task.make_predict_cli_call(item_for_inference)
    data_path = video_path if labels_path is None else labels_path
    assert cli_args[0] == "sleap-track"
    assert cli_args[1] == data_path
    assert "model1" in cli_args
    assert "model2" in cli_args
    assert "--frames" in cli_args
    frames_idx = cli_args.index("--frames")
    if -1 in frames:
        assert cli_args[frames_idx + 1] == "0"  # No redundant frames
    elif -4 in frames:
        assert cli_args[frames_idx + 1] == "1,-3"  # Ordered correctly
    else:
        assert cli_args[frames_idx + 1] == ",".join([str(f) for f in frames])
    assert "--tracking.tracker" in cli_args
    assert (
        "--max_instances" in cli_args
        if max_instances is not None
        else max_instances is None
    )
    assert output_path.startswith(data_path)
    assert output_path.endswith("predictions.slp")