code: def import_module(mod_str):
      
  
      _module = __import__(mod_str)
      _mod_parts = mod_str.split('.')
      for _mod_part in _mod_parts[1:]:
          _module = getattr(_module, _mod_part)
      return _module
docs: inspired by post on stackoverflow
      :param name: import path string like 'netshowlib.linux.provider_discovery'
      :return: module matching the import statement