def bulkIndex(self, data):
        serdata = ""

        for row in data:
            if row in '_id':
                id = row['id']
                del row['id']
            else:
                id = self._gen_id()

            d = {
                "index": {
                    "_index": self._get_index(),
                    "_type": row.get('type', 'log'),
                    "_id": id,
                }
            }
            serdata += json.dumps(d) + '\n'
            serdata += json.dumps(row) + '\n'

        return self._request('/_bulk', serdata.rstrip('\n'), 'PUT')
dataset/ETHPy150Open calston/tensor/tensor/protocol/elasticsearch.py/ElasticSearch.bulkIndex/swapped operands of `in`