<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def sync_mounts(self, active_mounts, resources, vault_client):
 """Synchronizes mount points. Removes things before adding new."""

        # Create a resource set that is only explicit mounts
        # and sort so removals are first
        mounts = [x for x in resources
                  if isinstance(x, (Mount, AWS))]

        s_resources = sorted(mounts, key=absent_sort)
        # Iterate over explicit mounts only
        for resource in s_resources:
            active_mounts = self.actually_mount(vault_client,
                                                resource,
                                                active_mounts)

        # OK Now iterate over everything but make sure it is clear
        # that ad-hoc mountpoints are deprecated as per
        # https://github.com/Autodesk/aomi/issues/110
        for resource in [x for x in resources
                         if isinstance(x, Secret)]:
            n_mounts = self.actually_mount(vault_client,
                                           resource,
                                           active_mounts)
            if len(n_mounts) != len(active_mounts):
                LOG.warning("Ad-Hoc mount with %s. Please specify"
                            " explicit mountpoints.", resource)

            active_mounts = n_mounts

        return active_mounts, [x for x in resources
                               if not isinstance(x, (Mount))]