Influence of Mg2+ ion on the optical and magnetic properties of TiO2 nanostructures: A key role of oxygen vacancy