def METHOD_NAME(encoded: str, **kwargs: Any) -> Optional[Mapping[str, Any]]:
    for plugin in _get_plugins():
        data = plugin.decode_api_token(encoded, **kwargs)
        if data:
            break
    else:
        try:
            data = jwt.METHOD_NAME(
                encoded,
                _get_secret(encode=False),
                algorithms=[_get_algorithm()],
                **kwargs
            )
        except jwt.InvalidTokenError as e:
            # TODO: add signal for performing extra work, like removing
            # expired tokens
            log.error(u"Cannot decode JWT token: %s", e)
            data = None
    return data