code: def require_keycloak_role(self, client, role):
          
          def wrapper(view_func):
              @wraps(view_func)
              def decorated(*args, **kwargs):
                  pre, tkn, post = self.get_access_token().split('.')
                  access_token = json.loads(b64decode(tkn))
                  if role in access_token['resource_access'][client]['roles']:
                      return view_func(*args, **kwargs)
                  else:
                      return abort(403)
              return decorated
          return wrapper
docs: Function to check for a KeyCloak client role in JWT access token.
  
          This is intended to be replaced with a more generic 'require this value
          in token or claims' system, at which point backwards compatibility will
          be added.
  
          .. versionadded:: 1.5.0