How to return multiple columns (each a composite type) in plpythonu
The simple way to do that would be to call your bar() function like this:

postgres@[local]:5432:postgres:=# SELECT * FROM bar();
 a | b
---+---
 1 | 2
 3 | 4
(2 rows)

Time: 0.622 ms
postgres@[local]:5432:postgres:=#


Which returns as a record type in this context, with two rows and two columns.

Hope that helps. =)