def do_regroup(self):
self._undraw()<EOL>
React to a change in the widget's pyglet graphics group.

In pyglet, groups are used to control layers and OpenGL state.  This 
method is called whenever the widget's group is changed, for example 
when the widget is attached to the GUI or moved from one part 
of the GUI to another.

Only widgets that actually draw things need to implement this method, 
because groups aren't used for anything but drawing.  Widgets that 
contain other widgets may need to implement `do_regroup_children()` 
to describe how those children should be regrouped.

It's not always trivial to change the group used to draw something in 
pyglet.  The way to do this depends on what's being drawn and whether 
or not it's been drawn before.  The simplest case are high-level APIs 
like `pyglet.sprite.Sprite` that allow you to simply change a 
``group`` attribute.  On the other hand, if you're drawing vertex lists 
yourself, you need to call the `pyglet.graphics.Batch.migrate()` 
method.  This method needs to know the OpenGL mode (e.g. GL_QUADS) 
associated with the vertex list, so you will have to keep track of 
that.

Keep in mind that this method is called before the widget is drawn and 
may be called after it's been undrawn, so any vertex lists created in 
the draw function may or may not exist yet/anymore.  If those vertex 
lists don't exist yet, there's nothing this function needs to do.  The 
`_draw()` function will be called when the widget's ready to draw, and 
at that point the vertex lists should be created with the right group.