code: def safe_import_module(module_name):
      
      try:
          return import_module(module_name)
      except ImportError as e:
          m = re.match(r"No module named '([\w\.]+)'", str(e))
          if not m or not module_name.startswith(m.group(1)):
              raise e
docs: Like :func:`importlib.import_module`, except it does not raise ``ImportError``
      if the requested ``module_name`` was not found.