Fix a non-empty open domain $\Omega\subseteq \mathbb{R}^d$ with compact closure, and a finite Borel measure $\mu$ on its closure $\overline{\Omega}$.

In Halmos' book it is shown that:

**Classical Result:**
*For any *bounded function* $f\in L^p_{\mu}(\Omega;\mathbb{R})$ and every $\epsilon >0$, there exists a continuous function $g$ such that
$$
\int_{x \in \Omega} |f(x)-g(x)|^p \mu(dx) < \epsilon.
$$*

**Reference/Question:**
Is there an analogue of this result for the *Musielak–Orlicz spaces*?

More specifically, I'm wondering if $p:\Omega\rightarrow \mathbb{R}$ is a measurable function satisfying the usual conditions (for example see this paper), and $ f \in L^{p(x)}_{\mu}(\Omega),$ then for every $\epsilon>0$, can we find a continuous function $g$ on $\overline{\Omega}$ such that $$ \|f-g\|_{\mu,p}<\epsilon, $$

**Background:**
Where in the above:
$$
L^{p(x)}_{\mu}(\Omega)\triangleq \left\{
f:\Omega \rightarrow \mathbb{R}: \mbox{f is measurable and } \int_{x \in \overline{\Omega}} |f(x)|^{p(x)} \mu(dx)<\infty
\right\},
$$
and can be seen to be a Musielak–Orlicz space space under the Luxemburg norm $\|\cdot\|_{\mu,p}$ defined by
$$
\|f\|_{\mu,p}\triangleq
\inf\left\{
\lambda >0 :
\int_{x \in \overline{\Omega}} \left(\frac{|f(x)|}{\lambda}\right)^{p(x)} \mu(dx) \leq 1
\right\}
.
$$