Doob-Dynkin Lemma

Given measurable functions \(f\), \(g\) on a common space \(\Omega\), we say that \(f\) is \(g\)-measurable if the induced \(\sigma\)-algebras satisfy \(\sigma(f) \subset \sigma(g)\). If \(f \colon \Omega \to S\) is a function and \((S, \mathcal{S})\) is a measurable space, then $$\sigma(f) = \left\{ f^{-1}A \mid A \in \mathcal{S} \right\}$$ is the smallest \(\sigma\)-algebra on \(\Omega\) such that \(f\) is \(\sigma(f)/\mathcal{S}\)-measurable.

Suppose we have another measurable function \(g \colon \Omega \to T\) where \((T, \mathcal{T})\) is a measurable space. Under what conditions is \(f\) is \(g\)-measurable?