def METHOD_NAME(self, num_partitions, grid_type):
    query_rdd = self.create_polygon_rdd(query_polygon_set, splitter, num_partitions)
    expected_count = polygon_match_with_original_duplicates_count if self.expect_to_preserve_original_duplicates(
        grid_type) else polygon_match_count
    self.index_int(
        query_rdd, num_partitions, grid_type, IndexType.RTREE, expected_count
    )