code: def module_not_available(module):
      """Can module be imported?  Returns true if module does NOT import.
  
      This is used to make a decorator to skip tests that require module to be
      available, but delay the 'import numpy' to test execution time.
      """
  
      def condition():
          try:
              mod = __import__(module)
              return False
          except ImportError:
              return True
  
      return condition
  
file_path: catboost/contrib/python/ipython-genutils/py3/ipython_genutils/testing/decorators.py
imports: import sys
  import os
  import tempfile
  import unittest
  from ..py3compat import string_types, which
label_desc: Use image node_id 6 for calling a global function with example usage: module_not_available(module) and returns: condition, False, True