Former France international Samir Nasri has been banned from football for six months for an anti-doping violation from 2016.