def points_to_region(region_pts):
    """
    Reverse Voronoi region polygon IDs to point ID assignments by returning a dict that maps each point ID to its
    Voronoi region polygon ID. All IDs should be integers.

    :param region_pts: dict mapping Voronoi region polygon IDs to list of point IDs
    :return: dict mapping point ID to Voronoi region polygon ID
    """

    pts_region = {}
    for poly, pts in region_pts.items():
        for pt in pts:
            if pt in pts_region.keys():
                raise ValueError('invalid assignments in `region_pts`: point %d is assigned to several polygons' % pt)
            pts_region[pt] = poly

    return pts_region