code: def _sql_expand_update(self, spec, key_prefix = '', col_prefix = ''):
          
          sql = ', '.join(col_prefix + key + ' = %(' + key_prefix + key + ')s' for key in spec)
          params = {}
          for key in spec:
              params[key_prefix + key] = spec[key]
  
          return sql, params
docs: Expand a dict so it fits in a INSERT clause