add typedef for batch insert, modify python example