def _requires_alpn(func):
 @wraps(func)
 def wrapper(*args, **kwargs):
  if (not _lib.Cryptography_HAS_ALPN):
   raise NotImplementedError('ALPN not available.')
  return func(*args, **kwargs)
 return wrapper

def _requires_alpn ( func ) : @ wraps ( func ) def wrapper ( * args , ** kwargs ) : if ( not _lib . Cryptography_HAS_ALPN ) : raise NotImplementedError ( 'ALPN not available.' ) return func ( * args , ** kwargs ) return wrapper
wraps any function that requires alpn support in openssl .