def SyncDn(self, base_dn=None, ldap_filter=None, skip_usn_changed=None):
    top_usn_changed = None

    for result in self._QueryLdap(base_dn, ldap_filter):
      current_usn_changed = int(result['uSNChanged'][0])
      # If the current host was loaded previously, skip it.
      if current_usn_changed == skip_usn_changed:
        continue

      try:
        self._ProcessHost(result)
      except PreviouslyEscrowed as e:
        logging.debug('Skipping previous escrowed GUID: %r', str(e))
      except InvalidDistinguishedName as e:
        logging.debug('Skipping object with invalid DN: %r', str(e))
        continue
      except InvalidRecoveryGuid as e:
        logging.debug(
            'Skipping object with invalid recovery GUID %r', str(e))
        continue

      top_usn_changed = max(top_usn_changed, current_usn_changed)

    self._DisconnectFromAd()

    return top_usn_changed
Queries a base DN using an LDAP filter and escrows results to CauliflowerVest.
dataset/ETHPy150Open google/cauliflowervest/src/cauliflowervest/client/win/bitlocker_ad_sync.py/BitLockerAdSync.SyncDn