code: def _get_valididty(self):
          
  
          try:
              self.ldap_connection.search(search_base=self.VALID_GROUP_TEST['base_dn'],
                                          search_filter=self.VALID_GROUP_TEST['filter_string'],
                                          search_scope=self.VALID_GROUP_TEST['scope'],
                                          attributes=self.VALID_GROUP_TEST['attribute_list'])
          except LDAPOperationsErrorResult as error_message:
              raise ImproperlyConfigured("The LDAP server most-likely does not accept anonymous connections:"
                                         "\n\t{error}".format(error=error_message[0]['info']))
          except LDAPInvalidDNSyntaxResult:
              return False, "Invalid DN Syntax: {group_dn}".format(group_dn=self.group_dn)
          except LDAPNoSuchObjectResult:
              return False, "No such group: {group_dn}".format(group_dn=self.group_dn)
          except LDAPSizeLimitExceededResult:
              return False, ("This group has too many children for ldap-groups to handle: "
                             "{group_dn}".format(group_dn=self.group_dn))
  
          return True, ""
docs: Determines whether this AD Group is valid.
  
          :returns: True and "" if this group is valid or False and a string description
                    with the reason why it isn't valid otherwise.