def debug_storage(storage, base_info=False, chars=True, runs=False):
import codecs<EOL>import locale<EOL>import sys<EOL>if six.PY2:<EOL><INDENT>stderr = codecs.getwriter(locale.getpreferredencoding())(sys.stderr)<EOL><DEDENT>else:<EOL><INDENT>stderr = sys.stderr<EOL><DEDENT>caller = inspect.stack()[<NUM_LIT:1>][<NUM_LIT:3>]<EOL>stderr.write('<STR_LIT>' % caller)<EOL>if base_info:<EOL><INDENT>stderr.write(u'<STR_LIT>' % storage['<STR_LIT>'])<EOL>stderr.write(u'<STR_LIT>' % storage['<STR_LIT>'])<EOL><DEDENT>if runs:<EOL><INDENT>stderr.write(u'<STR_LIT>' % list(storage['<STR_LIT>']))<EOL><DEDENT>if chars:<EOL><INDENT>output = u'<STR_LIT>'<EOL>for _ch in storage['<STR_LIT>']:<EOL><INDENT>if _ch != '<STR_LIT:\n>':<EOL><INDENT>output += _ch['<STR_LIT>']<EOL><DEDENT>else:<EOL><INDENT>output += '<STR_LIT:C>'<EOL><DEDENT><DEDENT>stderr.write(output + u'<STR_LIT:\n>')<EOL>output = u'<STR_LIT>' % u'<STR_LIT>'.join(<EOL>[six.text_type(_ch['<STR_LIT>']) for _ch in storage['<STR_LIT>']])<EOL>stderr.write(output)<EOL>_types = [_ch['<STR_LIT:type>'].ljust(<NUM_LIT:3>) for _ch in storage['<STR_LIT>']]<EOL>for i in range(<NUM_LIT:3>):<EOL><INDENT>if i:<EOL><INDENT>output = u'<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>output = u'<STR_LIT>'<EOL><DEDENT>stderr.write(output % u'<STR_LIT>'.join([_t[i] for _t in _types]))<EOL><DEDENT><DEDENT>
Display debug information for the storage