def get_window(self):
return self.root.window if self.is_attached_to_gui else None<EOL>
Return the `pyglet.window.Window` that the GUI is part of, or None if 
this widget hasn't been attached to the GUI yet.

You can attach event handlers to the window to react to events that 
aren't propagated through the widget hierarchy, e.g. key presses.