def METHOD_NAME(
    frames: List[Frame], config: Config, nproc: int = NPROC
) -> List[Frame]:
    """Converting segmentation poly2d to rles."""
    img_shape = config.imageSize
    assert img_shape is not None, "Seg conversion requires imageSize in config"
    img_shapes = [img_shape] * len(frames)
    logger.info("Start conversion for Seg to RLEs")
    return frames_to_rle(img_shapes, frames, nproc)