code: LoadedPackage GetPackageById(int package_id) {
      for (LoadedPackage loaded_package : packages_) {
        if (loaded_package.GetPackageId() == package_id) {
          return loaded_package;
        }
      }
      return null;
    }
docs: exists.