def sync_ldap_groups(connection, failed_users=None):
 groups = Group.objects.filter(group__in=LdapGroup.objects.all())
 for group in groups:
  _import_ldap_groups(connection, group.name, failed_users=failed_users)
 return groups

def sync_ldap_groups ( connection , failed_users = None ) : groups = Group . objects . filter ( group__in = LdapGroup . objects . all ( ) ) for group in groups : _import_ldap_groups ( connection , group . name , failed_users = failed_users ) return groups
syncs ldap group memberships .