Suppose $A(z)$ and $B(z)$ are $n\times n$ matrices with elements that are functions of $z\in \mathbb C$. Further, suppose that $A(z)$ is diagonal and that $$\det\left(A(z)B(z)-I_n\right)=0$$ has exactly $n$ roots, denoted by $\{z_i\}_{i=1}^n$. Let $C$ be a matrix with column $i$ given by the eigenvector of $A(z_i)B(z_i)$ with eigenvalue $1$.
Is there a more direct way to describe the matrix $C$?