Let $X$ be a measurable space. Given probability measures $p$ and $q$ on $X$, define their total variation distance as $$ d(p,q) = \sup_f \Big| \int f \, dp - \int f \, dq \Big| , $$ where $f$ varies over measurable functions $X \to [0,1]$.
If $Y$ is also a measurable space, let now $p$ and $q$ be measures on the product $X \times Y$. Again, $$ d(p,q) = \sup_f \Big| \int f \, dp - \int f \, dq \Big| , $$ where now $f$ varies over measurable functions $X \times Y\to [0,1]$.
However, can we equivalently test the distance with functions in the form $f(x,y)=g(x)h(y)$? That is, can we write $$ d(p,q) = \sup_{g,h} \Big| \int gh \, dp - \int gh \, dq \Big| , $$ where $g: X \to [0,1]$ and $h: Y \to [0,1]$?