class_docstr: Buckets are used to store the bytecode for one template.  It's created
  and initialized by the bytecode cache and passed to the loading functions.
  
  The buckets get an internal checksum from the cache assigned and use this
  to automatically reject outdated cache material.  Individual bytecode
  cache subclasses don't have to care about cache invalidation.
class_docstr_tok: ["Buckets","are","used","to","store","the","bytecode","for","one","template",".","It","'s","created","and","initialized","by","the","bytecode","cache","and","passed","to","the","loading","functions",".","The","buckets","get","an","internal","checksum","from","the","cache","assigned","and","use","this","to","automatically","reject","outdated","cache","material",".","Individual","bytecode","cache","subclasses","do","n't","have","to","care","about","cache","invalidation","."]
docstr: Return the bytecode as bytes.
docstr_tok: ["Return","the","bytecode","as","bytes","."]
code: def bytecode_to_string(self) -> bytes:
      """Return the bytecode as bytes."""
      out = BytesIO()
      self.write_bytecode(out)
      return out.getvalue()
  
imports: import errno
  import fnmatch
  import marshal
  import os
  import pickle
  import stat
  import sys
  import tempfile
  import typing
  from hashlib import sha1
  from io import BytesIO
  from types import CodeType
label_desc: Use image node_id 6 for calling the Bucket obj's underlying member method code with example usage: obj.bytecode_to_string() and returns: out