def bucket_keys_to_guarantee_result_set_size(self, bucket_key, N, tree_depth):
if tree_depth == len(bucket_key):<EOL><INDENT>return [self.bucket_key]<EOL><DEDENT>hash_char = bucket_key[tree_depth]<EOL>if hash_char == '<STR_LIT:0>':<EOL><INDENT>other_hash_char = '<STR_LIT:1>'<EOL><DEDENT>else:<EOL><INDENT>other_hash_char = '<STR_LIT:0>'<EOL><DEDENT>if hash_char in self.childs:<EOL><INDENT>if self.childs[hash_char].vector_count < N:<EOL><INDENT>listA = self.childs[hash_char].collect_all_bucket_keys()<EOL>listB = self.childs[other_hash_char].collect_all_bucket_keys()<EOL>return listA + listB<EOL><DEDENT>else:<EOL><INDENT>return self.childs[hash_char].bucket_keys_to_guarantee_result_set_size(bucket_key, N, tree_depth+<NUM_LIT:1>)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>return self.childs[other_hash_char].bucket_keys_to_guarantee_result_set_size(bucket_key, N, tree_depth+<NUM_LIT:1>)<EOL><DEDENT>
Returns list of bucket keys based on the specified bucket key
and minimum result size N.