Starting with barium nitrate solution, describe how a pure sample of barium carbonate can be prepared in the laboratory.