def METHOD_NAME(self, num_partitions, grid_type):
    query_rdd = self.create_rectangle_rdd(input_location, splitter, num_partitions)
    spatial_rdd = self.create_rectangle_rdd(input_location, splitter, num_partitions)
    self.partition_rdds(query_rdd, spatial_rdd, grid_type)
    result = JoinQuery.SpatialJoinQuery(
        spatial_rdd, query_rdd, False, True).collect()
    count = 0
    for el in result:
        count += el[1].__len__()
    self.sanity_check_join_results(result)
    expected_count = match_with_original_duplicates_count if self.expect_to_preserve_original_duplicates(
        grid_type) else match_count
    assert expected_count == self.count_join_results(result)