def debug_drawing_problems(self):
diagnoses = []<EOL>if not self.is_attached_to_gui:<EOL><INDENT>def find_unattached_parent(widget, level=<NUM_LIT:0>): <EOL><INDENT>if widget.parent is None: return widget, level<EOL>if widget.parent is self.root: return widget, level<EOL>else: return find_unattached_parent(widget.parent, level + <NUM_LIT:1>)<EOL><DEDENT>try:<EOL><INDENT>unattached_parent, level = find_unattached_parent(self)<EOL><DEDENT>except RecursionError:<EOL><INDENT>diagnoses.append("<STR_LIT>")<EOL><DEDENT>else:<EOL><INDENT>if unattached_parent is self:<EOL><INDENT>diagnoses.append("<STR_LIT>")<EOL><DEDENT>else:<EOL><INDENT>diagnoses.append("<STR_LIT>")<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>if self.rect is None:<EOL><INDENT>diagnoses.append("<STR_LIT>")<EOL><DEDENT>elif self.rect.area == <NUM_LIT:0>:<EOL><INDENT>if self.claimed_width and self.claimed_height:<EOL><INDENT>diagnoses.append("<STR_LIT>")<EOL><DEDENT>else:<EOL><INDENT>diagnoses.append("<STR_LIT>")<EOL><DEDENT><DEDENT>if self.group is None:<EOL><INDENT>diagnoses.append("<STR_LIT>")<EOL><DEDENT>if self.is_hidden:<EOL><INDENT>def find_hidden_parent(widget, level=<NUM_LIT:0>): <EOL><INDENT>if widget._hidden: return widget, level<EOL>else: return find_hidden_parent(widget.parent, level + <NUM_LIT:1>)<EOL><DEDENT>hidden_parent, level = find_hidden_parent(self)<EOL>if hidden_parent is self:<EOL><INDENT>diagnoses.append("<STR_LIT>")<EOL><DEDENT>else:<EOL><INDENT>diagnoses.append("<STR_LIT>")<EOL><DEDENT><DEDENT><DEDENT>if not diagnoses:<EOL><INDENT>diagnoses.append("<STR_LIT>")<EOL><DEDENT>def join(items, sep): <EOL><INDENT>for i, item in enumerate(items):<EOL><INDENT>if i < len(items) - <NUM_LIT:1>:<EOL><INDENT>yield item, sep<EOL><DEDENT>else:<EOL><INDENT>yield item, '<STR_LIT>'<EOL><DEDENT><DEDENT><DEDENT>for diagnosis, sep in join(diagnoses, '<STR_LIT:\n>'):<EOL><INDENT>print(diagnosis.format(**locals()) + sep, flush=True)<EOL><DEDENT>
Suggest reasons why a widget is not displaying.

It can be hard to debug problems when nothing is showing up on the 
screen, so this method is meant to help look for common reasons why 
that might be the case.  The suggestions will be printed to stdout.  
Make sure to call this method after attaching the widget to the GUI 
hierarchy, otherwise you'll just get a message saying the widget hasn't 
been attached to the GUI yet.