code: def crypto_validator(func):
      
      def func_in(*args, **kwargs):
          if not conf.crypto_valid:
              raise ImportError("Cannot execute crypto-related method! "
                                "Please install python-cryptography v1.7 or later.")  # noqa: E501
          return func(*args, **kwargs)
      return func_in
docs: This a decorator to be used for any method relying on the cryptography library.  # noqa: E501
      Its behaviour depends on the 'crypto_valid' attribute of the global 'conf'.