use the result as the argument for the call to the sql.extend method. call the connection.creation.sql_for_pending_references method with refto, no_style() and pending_references as arguments,
sql . extend ( connection . creation . sql_for_pending_references ( model , no_style ( ) , pending_references ) )