      if (collection.docs.isEmpty) {
        futures.add(
          rightCollection.add(
            BatchOfRawMeasurement(
              firstTimestamp: measurements.first.timestamp,
              lastTimestamp: measurements.last.timestamp,
              data: measurements,
            ).toJson(),
          ),
        );
       } else {

        final doc = await collection.docs.first.reference.update(data);
        if (!doc.exists) continue;
// допиши код тут
      }

 In your entire response, the letter a should appear less than 30.
user