class_docstr: Tracks the tree structure of a collection of ConjectureData
  objects, for use in ConjectureRunner.
docstr: Generate a short random string that (after rewriting) is not
  a prefix of any buffer previously added to the tree.
  
  The resulting prefix is essentially arbitrary - it would be nice
  for it to be uniform at random, but previous attempts to do that
  have proven too expensive.
docstr_tok: ["Generate","a","short","random","string","that","(","after","rewriting",")","is","not","a","prefix","of","any","buffer","previously","added","to","the","tree",".","The","resulting","prefix","is","essentially","arbitrary","-","it","would","be","nice","for","it","to","be","uniform","at","random",",","but","previous","attempts","to","do","that","have","proven","too","expensive","."]
code: def generate_novel_prefix(self, random):
      """Generate a short random string that (after rewriting) is not
      a prefix of any buffer previously added to the tree.
  
      The resulting prefix is essentially arbitrary - it would be nice
      for it to be uniform at random, but previous attempts to do that
      have proven too expensive.
      """
      assert not self.is_exhausted
      novel_prefix = bytearray()
  
      def append_int(n_bits, value):
          novel_prefix.extend(
              int_to_bytes(value, bits_to_bytes(n_bits))
          )
  
      current_node = self.root
      while True:
          assert not current_node.is_exhausted
          for i, (n_bits, value) in enumerate(
              zip(current_node.bit_lengths, current_node.values)
          ):
              if i in current_node.forced:
                  append_int(n_bits, value)
              else:
                  while True:
                      k = random.getrandbits(n_bits)
                      if k != value:
                          append_int(n_bits, k)
                          break
                  # We've now found a value that is allowed to
                  # vary, so what follows is not fixed.
                  return hbytes(novel_prefix)
          else:
              assert not isinstance(
                  current_node.transition, (Conclusion, Killed)
              )
              if current_node.transition is None:
                  return hbytes(novel_prefix)
              branch = current_node.transition
              assert isinstance(branch, Branch)
              n_bits = branch.bit_length
  
              check_counter = 0
              while True:
                  k = random.getrandbits(n_bits)
                  try:
                      child = branch.children[k]
                  except KeyError:
                      append_int(n_bits, k)
                      return hbytes(novel_prefix)
                  if not child.is_exhausted:
                      append_int(n_bits, k)
                      current_node = child
                      break
                  check_counter += 1
                  # We don't expect this assertion to ever fire, but coverage
                  # wants the loop inside to run if you have branch checking
                  # on, hence the pragma.
                  assert (  # pragma: no cover
                      check_counter != 1000
                      or len(branch.children) < (2**n_bits)
                      or any(
                          not v.is_exhausted
                          for v in branch.children.values()
                      )
                  )
  
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 3 for calling the DataTree obj's underlying member method code with example usage: obj.generate_novel_prefix(random) and returns: hbytes, hbytes, hbytes