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) -> Sequence[int]:
      """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
  
      result = tuple(self.__choices)
  
      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
          assert target.live_child_count is not None
          target.live_child_count -= 1
  
      return result
  
file_path: catboost/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/choicetree.py
imports: from collections import defaultdict
  from random import Random
  from typing import Callable, Dict, Iterable, List, Optional, Sequence
  from hypothesis.internal.conjecture.junkdrawer import LazySequenceCopy, pop_random
label_desc: Use image node_id 3 for calling the Chooser obj's underlying member method code with example usage: obj.finish() and returns: result