def select_sub(self, query, as_):
        if isinstance(query, QueryBuilder):
            bindings = query.get_bindings()

            query = query.to_sql()
        elif isinstance(query, basestring):
            bindings = []
        else:
            raise ArgumentError('Invalid subselect')

        return self.select_raw('(%s) AS %s' % (query, self._grammar.wrap(as_)), bindings)
this clones the kw dict, adding a lower-case version of every
dataset/ETHPy150Open sdispater/orator/orator/query/builder.py/QueryBuilder.select_sub--crossover with--dataset/ETHPy150Open meejah/txtorcon/txtorcon/circuit.py/Circuit._create_flags