def _to_sqlite3_by_table(self, conn, table_name):
        def _insert_item(item):
            if isinstance(item, dict):
                cols = ', '.join(item.keys())
                placeholders = ', '.join('?' * len(item))
                sql = 'INSERT INTO {} ({}) VALUES ({})'.format(table_name, cols, placeholders)
                conn.execute(sql, tuple(item.values()))
            elif is_namedtuple(item):
                cols = ', '.join(item._fields)
                placeholders = ', '.join('?' * len(item))
                sql = 'INSERT INTO {} ({}) VALUES ({})'.format(table_name, cols, placeholders)
                conn.execute(sql, item)
            elif isinstance(item, (list, tuple)):
                placeholders = ', '.join('?' * len(item))
                sql = 'INSERT INTO {} VALUES ({})'.format(table_name, placeholders)
                conn.execute(sql, item)
            else:
                raise TypeError('item must be one of dict, namedtuple, tuple or list got {}'
                                .format(type(item)))

        self.for_each(_insert_item)
Tests that a SaltCloudSystemExit is raised when something other than
dataset/ETHPy150Open EntilZha/PyFunctional/functional/pipeline.py/Sequence._to_sqlite3_by_table--crossover with--dataset/ETHPy150Open saltstack/salt/tests/unit/cloud/clouds/opennebula_test.py/OpenNebulaTestCase.test_vm_deploy_action_error