The code behind the Hertzsprung-Russell diagram from Gaia data