def _import_ldap_groups(connection, groupname_pattern, import_members=False, recursive_import_members=False, sync_users=True, import_by_dn=False, failed_users=None):
 if (desktop.conf.LDAP.SUBGROUPS.get().lower() == 'suboordinate'):
  return _import_ldap_suboordinate_groups(connection=connection, groupname_pattern=groupname_pattern, import_members=import_members, recursive_import_members=recursive_import_members, sync_users=sync_users, import_by_dn=import_by_dn, failed_users=failed_users)
 else:
  return _import_ldap_nested_groups(connection=connection, groupname_pattern=groupname_pattern, import_members=import_members, recursive_import_members=recursive_import_members, sync_users=sync_users, import_by_dn=import_by_dn, failed_users=failed_users)

def _import_ldap_groups ( connection , groupname_pattern , import_members = False , recursive_import_members = False , sync_users = True , import_by_dn = False , failed_users = None ) : if ( desktop . conf . LDAP . SUBGROUPS . get ( ) . lower ( ) == 'suboordinate' ) : return _import_ldap_suboordinate_groups ( connection = connection , groupname_pattern = groupname_pattern , import_members = import_members , recursive_import_members = recursive_import_members , sync_users = sync_users , import_by_dn = import_by_dn , failed_users = failed_users ) else : return _import_ldap_nested_groups ( connection = connection , groupname_pattern = groupname_pattern , import_members = import_members , recursive_import_members = recursive_import_members , sync_users = sync_users , import_by_dn = import_by_dn , failed_users = failed_users )
import a group from ldap .