       [events]
       (let [events (->> (if (sequential? events) events (list events))
                         (keep #(event->point-9 % opts)))
-            batch-point (get-batchpoint opts)
+            ^BatchPoints batch-point (get-batchpoint opts)
             _ (doseq [event events] (.point batch-point event))]
         (write-batch-point connection batch-point)
         batch-point))))

       (let [event (first events)
             opts (merge opts ;; we can have per event :db :retention :consistency
                         (select-keys event [:db :retention :consistency]))
             batch-point (get-batchpoint opts)
             _ (doseq [event events] (.point batch-point (event->point event opts)))]
         batch-point)))
   events))

(defn partition-events
  "`events` is a list of events
  partition `events` depending of the `db`, `retention` and `consistency` keys
  returns a list, each element being a list of events (the result of the partitioning)."
  [events]

   (javax.net.ssl SSLContext X509TrustManager HostnameVerifier)
   (java.security SecureRandom)
   (java.security.cert X509Certificate)
   (org.influxdb InfluxDB InfluxDBFactory InfluxDB$ConsistencyLevel)
   (org.influxdb.dto BatchPoints Point)))

(defn nil-or-empty-str
