'Remove all expired leases.
:param datetime now: The current date/time.
:return: The updated ``Leases`` representation.'

def expire(self, now):

    updated = self
    for lease in self.values():
        if ((lease.expiration is not None) and (lease.expiration < now)):
            updated = updated.release(lease.dataset_id, lease.node_id)
    return updated
