def METHOD_NAME(self):
    query_obj = self.as_connection.query(self.test_ns, self.test_set)
    ids = []
    def callback(part_id, input_tuple):
        ids.append(part_id)
    policy = {"partition_filter": {"begin": 1001, "count": 1}}
    query_obj.foreach(callback, policy)
    assert len(ids) == self.partition_1001_count
    stats = query_obj.get_partitions_status()
    assert stats