<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_group_shape(self, shapes=[]):
 """Return a |GroupShape| object newly appended to this shape tree. The group shape is empty and must be populated with shapes using methods on its shape tree, available on its `.shapes` property. The position and extents of the group shape are determined by the shapes it contains; its position and extents are recalculated each time a shape is added to it. """

        grpSp = self._element.add_grpSp()
        for shape in shapes:
            grpSp.insert_element_before(shape._element, 'p:extLst')
        if shapes:
            grpSp.recalculate_extents()
        return self._shape_factory(grpSp)