An Indonesian court sentenced an Australian citizen to 12 years in prison after finding him guilty of smuggling cocaine to the tourist island of Bali.