Get Microsoft Visual Studio 2019 to highlight Python syntax errors correctly

Solution for Get Microsoft Visual Studio 2019 to highlight Python syntax errors correctly
is Given Below:

imagine of incorrect python syntax highlighting
i expect the datetime in line 10 to be highlighted red because i haven’t imported datetime

it should look like http://i.prntscr.com/R4VT6r2sRJuA9bR61zEmOA.png

how do i get visual studio 2019 to do proper python syntax highlighting? also how do i make it so the line number is shown on the left side instead of it being blank?