Returns this group's parent (up to the DC)

def parent(self):
        """ Returns this group's parent (up to the DC)"""

        # Don't go above the DC
        if ''.join(self.group_dn.split("DC")[0].split()) == '':
            return self
        else:
            parent_dn = self.group_dn.split(",", 1).pop()
            return ADGroup(
                group_dn=parent_dn, server_uri=self.server_uri, base_dn=self.base_dn,
                user_lookup_attr=self.user_lookup_attr, group_lookup_attr=self.group_lookup_attr,
                attr_list=self.attr_list, bind_dn=self.bind_dn, bind_password=self.bind_password,
                user_search_base_dn=self.user_search_base_dn, group_search_base_dn=self.user_search_base_dn
            )