code: def check_modpath_has_init(path, mod_path):
      
      modpath = []
      for part in mod_path:
          modpath.append(part)
          path = os.path.join(path, part)
          if not _has_init(path):
              old_namespace = util.is_namespace(".".join(modpath))
              if not old_namespace:
                  return False
      return True
docs: check there are some __init__.py all along the way