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.
      """
      try:
          mod = __import__(module)
          mod_not_avail = False
      except ImportError:
          mod_not_avail = True
  
      return mod_not_avail
  
file_path: catboost/contrib/python/ipython/py2/IPython/testing/decorators.py
imports: import sys
  import os
  import tempfile
  import unittest
  import warnings
  from decorator import decorator
  from .ipunittest import ipdoctest, ipdocstring
  from IPython.external.decorators import *
  from IPython.utils.py3compat import string_types, which, PY2, PY3, PYPY
label_desc: Use image node_id 7 for calling a global function with example usage: module_not_available(module) and returns: mod_not_avail