class_docstr: A source of nondeterminism for use in shrink passes.
class_docstr_tok: ["A","source","of","nondeterminism","for","use","in","shrink","passes","."]
docstr: Record the decisions made in the underlying tree and return
  a prefix that can be used for the next Chooser to be used.
docstr_tok: ["Record","the","decisions","made","in","the","underlying","tree","and","return","a","prefix","that","can","be","used","for","the","next","Chooser","to","be","used","."]
code: def finish(self):
      """Record the decisions made in the underlying tree and return
      a prefix that can be used for the next Chooser to be used."""
      self.__finished = True
      assert len(self.__node_trail) == len(self.__choices) + 1
  
      next_value = list(self.__choices)
      if next_value:
          next_value[-1] += 1
          for i in hrange(len(next_value) - 1, -1, -1):
              if next_value[i] >= self.__node_trail[i].n:
                  next_value[i] = 0
                  if i > 0:
                      next_value[i - 1] += 1
              else:
                  break
  
      self.__node_trail[-1].live_child_count = 0
      while (
          len(self.__node_trail) > 1 and self.__node_trail[-1].exhausted
      ):
          self.__node_trail.pop()
          assert len(self.__node_trail) == len(self.__choices)
          i = self.__choices.pop()
          target = self.__node_trail[-1]
          target.children[i] = DeadNode
          target.live_child_count -= 1
  
      while len(next_value) > 0 and next_value[-1] == 0:
          next_value.pop()
  
      return tuple(next_value)
  
file_path: catboost/contrib/python/hypothesis/py2/hypothesis/internal/conjecture/choicetree.py
imports: from __future__ import absolute_import, division, print_function
  from collections import defaultdict
  from hypothesis.internal.compat import hrange
label_desc: Use image node_id 3 for calling the Chooser obj's underlying member method code with example usage: obj.finish() and returns: tuple