code: def remove_group_by_id(self, group_id, recursive=True):
          
          group = self.objects[group_id]
          if group is None:
              return False
  
          result = True
          # iterate over the children and determine if they are file/group and call the right method.
          for subgroup_id in list(group.children):
              subgroup = self.objects[subgroup_id]
              if subgroup is None:
                  return False
  
              if recursive and isinstance(subgroup, PBXGroup):
                  result &= self.remove_group_by_id(subgroup.get_id(), recursive)
              if isinstance(subgroup, PBXFileReference):
                  result &= self.remove_file_by_id(subgroup.get_id())
  
          if not result:
              return False
  
          del self.objects[group.get_id()]
  
          # remove the reference from any other group object that could be containing it.
          for other_group in self.objects.get_objects_in_section(u'PBXGroup'):
              other_group.remove_child(group)
  
          return True
docs: Remove the group matching the given group_id. If recursive is True, all descendants of this group are also removed.
          :param group_id: The group id to be removed
          :param recursive: All descendants should be removed as well
          :return: True if the element was removed successfully, False if an error occured or there was nothing to remove.