def _append_param_insert_pk_returning(compiler, stmt, c, values, kw):
 if (c.default is not None):
  if c.default.is_sequence:
   if (compiler.dialect.supports_sequences and ((not c.default.optional) or (not compiler.dialect.sequences_optional))):
    proc = compiler.process(c.default, **kw)
    values.append((c, proc))
   compiler.returning.append(c)
  elif c.default.is_clause_element:
   values.append((c, compiler.process(c.default.arg.self_group(), **kw)))
   compiler.returning.append(c)
  else:
   values.append((c, _create_insert_prefetch_bind_param(compiler, c)))
 elif ((c is stmt.table._autoincrement_column) or (c.server_default is not None)):
  compiler.returning.append(c)
 elif (not c.nullable):
  _warn_pk_with_no_anticipated_value(c)

def _append_param_insert_pk_returning ( compiler , stmt , c , values , kw ) : if ( c . default is not None ) : if c . default . is_sequence : if ( compiler . dialect . supports_sequences and ( ( not c . default . optional ) or ( not compiler . dialect . sequences_optional ) ) ) : proc = compiler . process ( c . default , ** kw ) values . append ( ( c , proc ) ) compiler . returning . append ( c ) elif c . default . is_clause_element : values . append ( ( c , compiler . process ( c . default . arg . self_group ( ) , ** kw ) ) ) compiler . returning . append ( c ) else : values . append ( ( c , _create_insert_prefetch_bind_param ( compiler , c ) ) ) elif ( ( c is stmt . table . _autoincrement_column ) or ( c . server_default is not None ) ) : compiler . returning . append ( c ) elif ( not c . nullable ) : _warn_pk_with_no_anticipated_value ( c )
create a primary key expression in the insert statement and possibly a returning clause for it .