code: private static ImmutableList<String> computePathPrefixes(String path) {
      List<String> pieces = Q_NAME_SPLITTER.splitToList(path);
      ImmutableList.Builder<String> pathPrefixes = ImmutableList.builder();
  
      String partial = pieces.get(0); // There will always be at least 1.
      pathPrefixes.add(partial);
      for (int i = 1; i < pieces.size(); i++) {
        partial = Q_NAME_JOINER.join(partial, pieces.get(i));
        pathPrefixes.add(partial);
      }
  
      return pathPrefixes.build();
    }
docs: Computes a list of the path prefixes constructed from the components of the path.
  
  <pre>
  E.g., if the path is:
  "a.b.c"
  then then path prefixes will be
  ["a","a.b","a.b.c"]:
  </pre>