DOC: Add example code for documentation of sparse.linalg.cg.
DOC: Add example code for documentation of sparse.linalg.cg.

This commit is in partial fulfillment of #7168.

Add example code for documentation of sparse.linalg.cg.

update example docs

vigna/scipy,scipy/scipy,Stefan-Endres/scipy,scipy/scipy,mdhaber/scipy,anntzer/scipy,Stefan-Endres/scipy,WarrenWeckesser/scipy,ilayn/scipy,Stefan-Endres/scipy,andyfaff/scipy,mdhaber/scipy,endolith/scipy,mdhaber/scipy,perimosocordiae/scipy,rgommers/scipy,perimosocordiae/scipy,mdhaber/scipy,anntzer/scipy,Stefan-Endres/scipy,scipy/scipy,andyfaff/scipy,ilayn/scipy,endolith/scipy,andyfaff/scipy,scipy/scipy,rgommers/scipy,mdhaber/scipy,ilayn/scipy,anntzer/scipy,endolith/scipy,WarrenWeckesser/scipy,anntzer/scipy,rgommers/scipy,endolith/scipy,andyfaff/scipy,scipy/scipy,andyfaff/scipy,vigna/scipy,perimosocordiae/scipy,Stefan-Endres/scipy,endolith/scipy,WarrenWeckesser/scipy,anntzer/scipy,endolith/scipy,perimosocordiae/scipy,ilayn/scipy,rgommers/scipy,anntzer/scipy,vigna/scipy,perimosocordiae/scipy,scipy/scipy,WarrenWeckesser/scipy,vigna/scipy,WarrenWeckesser/scipy,ilayn/scipy,vigna/scipy,rgommers/scipy,mdhaber/scipy,andyfaff/scipy,ilayn/scipy,perimosocordiae/scipy,WarrenWeckesser/scipy,Stefan-Endres/scipy