code: def is_module_or_package(path):
      
      is_module = osp.isfile(path) and osp.splitext(path)[1] in ('.py', '.pyw')
      is_package = osp.isdir(path) and osp.isfile(osp.join(path, '__init__.py'))
      return is_module or is_package
docs: Return True if path is a Python module/package