docs: static double routeDistanceRemaining(double legDistanceRemaining, int legIndex,
                                         DirectionsRoute directionsRoute) {
      if (directionsRoute.legs().size() < 2) {
        return legDistanceRemaining;
      }
  
      for (int i = legIndex + 1; i < directionsRoute.legs().size(); i++) {
        legDistanceRemaining += directionsRoute.legs().get(i).distance();
      }
      return legDistanceRemaining;
    }