code: def import_module_or_none(module_label):
      
      try:
          # On Python 3, importlib has much more functionality compared to Python 2.
          return importlib.import_module(module_label)
      except ImportError:
          # Based on code from django-oscar:
          # There are 2 reasons why there could be an ImportError:
          #
          #  1. Module does not exist. In that case, we ignore the import and return None
          #  2. Module exists but another ImportError occurred when trying to import the module.
          #     In that case, it is important to propagate the error.
          #
          # ImportError does not provide easy way to distinguish those two cases.
          # Fortunately, the traceback of the ImportError starts at __import__
          # statement. If the traceback has more than one frame, it means that
          # application was found and ImportError originates within the local app
          __, __, exc_traceback = sys.exc_info()
          frames = traceback.extract_tb(exc_traceback)
          frames = [f for f in frames
                    if f[0] != "<frozen importlib._bootstrap>" and  # Python 3.6
                    f[0] != IMPORT_PATH_IMPORTLIB and
                    not f[0].endswith(IMPORT_PATH_GEVENT) and
                    not IMPORT_PATH_PYDEV in f[0]]
          if len(frames) > 1:
              raise
      return None
docs: Imports the module with the given name.
  
      Returns None if the module doesn't exist,
      but it does propagates import errors in deeper modules.