Is it true the following statement?
Given two Polish spaces $X,Y$ and a Borel function $f:X\rightarrow Y$, there exists a Polish space $Z$ and a Borel function $g:X \rightarrow Y\times Z$ with closed graph such that $f(x) \ = \pi_Y(g(x))$ for all $x \in X$.
In case it was true, do you have any hint for the proof?
Thanks!