       [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))))


(defn write-batch-point
  "Write to influxdb the `batch-point` using the `connection`"
  [connection batch-point]
  (.write connection batch-point))

(defn get-batchpoints
  "Create a `org.influxdb.dto.BatchPoints` for each element in the `event` list.
  `event` is a list where each element is a list of events.
  Each element contains events with the same `:db`, `:retention` and `:consistency` keys.
  These options are used to create the BatchPoints.
  `opts` are the global influxdb stream options."

   (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
