code: def bucket_keys_to_guarantee_result_set_size(self, bucket_key, N, tree_depth):
          
  
          if tree_depth == len(bucket_key):
              #print 'Returning leaf bucket key %s with %d vectors' % (self.bucket_key, self.vector_count)
              # This is a leaf so just return the bucket key (we reached the bucket leaf)
              return [self.bucket_key]
  
          # If not leaf, this is a subtree node.
  
          hash_char = bucket_key[tree_depth]
          if hash_char == '0':
              other_hash_char = '1'
          else:
              other_hash_char = '0'
  
          # Check if child has enough results
          if hash_char in self.childs:
              if self.childs[hash_char].vector_count < N:
                  # If not combine buckets of both child subtrees
                  listA = self.childs[hash_char].collect_all_bucket_keys()
                  listB = self.childs[other_hash_char].collect_all_bucket_keys()
                  return listA + listB
              else:
                  # Child subtree has enough results, so call method on child
                  return self.childs[hash_char].bucket_keys_to_guarantee_result_set_size(bucket_key, N, tree_depth+1)
          else:
              # That subtree is not existing, so just follow the other side
              return self.childs[other_hash_char].bucket_keys_to_guarantee_result_set_size(bucket_key, N, tree_depth+1)
docs: Returns list of bucket keys based on the specified bucket key
          and minimum result size N.