def METHOD_NAME(data_source_fn, reindex_masks=False):
    polygons, vertices, mask_ids = fn.external_source(source=data_source_fn, num_outputs=3,
                                                      device='cpu')
    out_polygons, out_vertices = fn.segmentation.select_masks(mask_ids, polygons, vertices,
                                                              reindex_masks=reindex_masks)
    return polygons, vertices, mask_ids, out_polygons, out_vertices