code: def all_packages():
      
      establish_cache()
      result = []
      pkgs = javabridge.get_collection_wrapper(
          javabridge.static_call(
              "weka/core/WekaPackageManager", "getAllPackages", "()Ljava/util/List;"))
      for pkge in pkgs:
          result.append(Package(pkge))
      return result
docs: Returns a list of all packages.
  
      :return: the list of packages
      :rtype: list