def METHOD_NAME(self, num_partitions, grid_type, index_type, intersects):
    query_rdd = self.create_polygon_rdd(query_polygon_set, splitter, num_partitions)
    spatial_rdd = self.create_polygon_rdd(input_location, splitter, num_partitions)
    self.partition_rdds(query_rdd, spatial_rdd, grid_type)
    join_params = JoinParams(True, intersects, index_type, JoinBuildSide.LEFT)
    result = JoinQuery.spatialJoin(query_rdd, spatial_rdd, join_params).collect()
    self.sanity_check_flat_join_results(result)
    expected_count = self.get_expected_with_original_duplicates_count(intersects) \
        if self.expect_to_preserve_original_duplicates(grid_type) else self.get_expected_count(intersects)
    assert expected_count == result.__len__()