code: public static String getParentLocationString(Location[] parents) {
      StringBuilder sb = new StringBuilder();
      if (parents != null) {
        for (Location parent : parents) {
          if (sb.length() > 0) {
            sb.append(", ");
          }
          sb.append(String.format("%s (%s)", parent.getLocationName(), parent.getDisplayType()));
        }
      } else {
        sb.append("N/A");
      }
      return sb.toString();
    }
docs: Helper function to format a string for parent locations.
  
  @param parents List of parent locations.
  @return Formatted string representing parent locations.