code: def draw_bits(self, n_bits, forced, value):
      i = self.__index_in_current_node
      self.__index_in_current_node += 1
      node = self.__current_node
      assert len(node.bit_lengths) == len(node.values)
      if i < len(node.bit_lengths):
          if n_bits != node.bit_lengths[i]:
              inconsistent_generation()
          # Note that we don't check whether a previously
          # forced value is now free. That will be caught
          # if we ever split the node there, but otherwise
          # may pass silently. This is acceptable because it
          # means we skip a hash set lookup on every
          # draw and that's a pretty niche failure mode.
          if forced and i not in node.forced:
              inconsistent_generation()
          if value != node.values[i]:
              node.split_at(i)
              assert i == len(node.values)
              new_node = TreeNode()
              branch = node.transition
              branch.children[value] = new_node
              self.__current_node = new_node
              self.__index_in_current_node = 0
      else:
          trans = node.transition
          if trans is None:
              node.bit_lengths.append(n_bits)
              node.values.append(value)
              if forced:
                  node.mark_forced(i)
          elif isinstance(trans, Conclusion):
              assert trans.status != Status.OVERRUN
              # We tried to draw where history says we should have
              # stopped
              inconsistent_generation()
          else:
              assert isinstance(trans, Branch), trans
              if n_bits != trans.bit_length:
                  inconsistent_generation()
              try:
                  self.__current_node = trans.children[value]
              except KeyError:
                  self.__current_node = trans.children.setdefault(
                      value, TreeNode()
                  )
              self.__index_in_current_node = 0
      if self.__trail[-1] is not self.__current_node:
          self.__trail.append(self.__current_node)
  
imports: from __future__ import absolute_import, division, print_function
  import attr
  from hypothesis.errors import Flaky, HypothesisException
  from hypothesis.internal.compat import hbytes, int_to_bytes
  from hypothesis.internal.conjecture.data import ConjectureData, DataObserver, Status, StopTest, bits_to_bytes
  from hypothesis.internal.conjecture.junkdrawer import IntList
label_desc: Use image node_id 2 for calling the TreeRecordingObserver obj's underlying member method code with example usage: obj.draw_bits(n_bits, forced, value) without return types