def _make_requires(flag, error):
def _requires_decorator(func):<EOL><INDENT>if not flag:<EOL><INDENT>@wraps(func)<EOL>def explode(*args, **kwargs):<EOL><INDENT>raise NotImplementedError(error)<EOL><DEDENT>return explode<EOL><DEDENT>else:<EOL><INDENT>return func<EOL><DEDENT><DEDENT>return _requires_decorator<EOL>
Builds a decorator that ensures that functions that rely on OpenSSL
functions that are not present in this build raise NotImplementedError,
rather than AttributeError coming out of cryptography.

:param flag: A cryptography flag that guards the functions, e.g.
    ``Cryptography_HAS_NEXTPROTONEG``.
:param error: The string to be used in the exception if the flag is false.