We need first review some related concepts:

Unilateral Z-transform

\[X(z)=Z\{x[n]\}=\sum_{n=0}^\infty x[n]z^{-n}\]

Unfortunately, there is no off-the-shelf python library for Z-tranform computation.

(A possible alternative is the Chirp z-Transform algorithm)

Further discussion is remain to be continued.