'Copy current groups into a copy of self ``out``'

def _copy_groups(self, out):

    if self.parent_table:
        if hasattr(self.parent_table, u'_groups'):
            out._groups = groups.ColumnGroups(out, indices=self.parent_table._groups._indices)
    elif hasattr(self, u'_groups'):
        out._groups = groups.ColumnGroups(out, indices=self._groups._indices)
