def METHOD_NAME(self, group, send_to_es=False):
    group.save()
    self.addCleanup(group.delete)
    if send_to_es:
        group_adapter.index(group, refresh=True)
        self.addCleanup(group_adapter.delete, group._id)
    return group