code: def insert(self, events):
          
          if not len(events):
              return
          keys = sorted(events[0].keys())
          ss = ','.join(['%s' for _ in keys])
          query = 'INSERT INTO %s (%s) VALUES ' % (self.table, ','.join(keys))
          data = []
          for event in events:
              query += '(%s),' % ss
              data += [event[k] for k in keys]
          query = query[:-1] + ';'
          LOG.info("%s (data: %s)", query, data)
          conn = self.conn.conn
          cursor = conn.cursor()
          cursor.execute(query, data)
          conn.commit()
docs: Constructs and executes a MySQL insert for the given events.