Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I don't know the answer to the question, but I believe that the two "counter-examples" in the current answers do not directly respond to the question. In Michael's example, the choice of $f$ depends on $x$, which is not allowed. In Christophe's example, $\mathcal{F}$ is not the set of all measurable functions from $A$ to $A$.