def METHOD_NAME(token, expected_data=None, force=False):
    """Validate a secret link token (non-expiring + expiring).
    If ``expected_data`` is supplied, its presence in the token will be
    required in order for the token to be considered valid.
    If ``force`` is set to ``True``, the token's expiration date is
    ignored.
    """
    for algorithm in SUPPORTED_DIGEST_ALGORITHMS:
        s = SecretLinkSerializer(algorithm_name=algorithm)
        st = TimedSecretLinkSerializer(algorithm_name=algorithm)
        for serializer in (s, st):
            # serializer.validate_token() already handles BadData
            data = serializer.validate_token(
                token, expected_data=expected_data, force=force
            )
            if data:
                return data