I am using the listings package. With the code below I get a result like this

I want to draw a line next to the line numbers like below.

Also if possible I would like to change the background color of the line numbers.
The code I'm using is like below
\documentclass[12pt, a4paper]{report}
\usepackage{listings}
\usepackage{xcolor}
\definecolor{codegreen}{rgb}{0,0.6,0}
\definecolor{codegray}{rgb}{0.5,0.5,0.5}
\definecolor{codepurple}{rgb}{0.58,0,0.82}
\definecolor{backcolour}{rgb}{0.95,0.95,0.92}
\lstdefinestyle{mystyle}{
basicstyle=\ttfamily\footnotesize,
escapeinside={(}{)},
frame=single,
breakatwhitespace=false,
breaklines=true,
captionpos=b,
keepspaces=true,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2,
numbers=left,
numbersep=5pt,
framexleftmargin=1.5em,
xleftmargin=2em,
backgroundcolor=\color{backcolour},
commentstyle=\color{codegreen},
keywordstyle=\color{magenta},
numberstyle=\color{codegray},
stringstyle=\color{codepurple}
}
\lstset{style=mystyle}
\begin{document}
\begin{lstlisting}[language=python]
for j=2 to A.length
key=A[j]
i=j-1
while i>0 and A[i]>key
A[i+1]=A[i]
i=i-1
A[i+1]=key
\end{lstlisting}
\end{document}
