Let $G$ be a locally compact group and $H\subset G$ a closed and cocompact subgroup. I wish to consider bounded continuous functions from $G$ to $\mathbb{C}$ that are periodic in the following strong sense:

Ad-hoc definition:A bounded continuous function $f\in C_b(G)$ is (right-)$H$-periodic, if $f(gh)=f(g)$ for all $g\in G$.

In particular, if $\pi: G\to G/H$ is the quotient map, then this set of functions is precisely the image of the map $C(G/H)\to C_b(G)$ given by $f\mapsto f\circ\pi$.

**My first question:** If a function $f\in C_b(G)$ satisfies the $H$-periodicity condition *approximately* on a large compact set, can it then be perturbed to an $H$-periodic function on a large compact set?

More precisely, does the following hold?

For every $\varepsilon>0$ and compact set $K\subset G$, there exist $\delta>0$ and compact sets $K_1\subset G$, $K_2\subset H$ so that the following holds: If $f_1\in C_b(G)$ is a function with $\|f_1\|_\infty\leq 1$ and $$\max_{g\in K_1}\max_{h\in K_2}\|f_1(gh)-f_1(g)\|\leq\delta,$$ then there exists an $H$-periodic function $f_2$ with $\|f_2-f_1\|_{\infty, K}\leq\varepsilon$.

I have tried to find something like this in the literature, but to no avail.

I figure that if it is true, it should be some clever argument involving only elementary topology and some group theory. In such a case, I really hope for a positive answer in greater generality. Given some C*-algebra $A$, $H$-periodicity makes perfect sense for bounded continuous functions from $G$ to $A$.

**My main question**: Given a C*-algebra $A$, can an *approximately* $H$-periodic function in $C_b(G,A)$ be perturbed to an $H$-periodic function in the above sense?

**Thoughts:** In many cases, this is fairly clear. If $G$ is discrete, then one can just pick a finite representing set of $G/H$, restrict the function $f_1$ there and get $f_2$ by translating this set around with $H$. In cases like $G=\mathbb{R}$ or $\mathbb{R}^n$, it is also (fairly) clear upon choosing a *nice* set of representatives for the quotient and perturb on its "boundary". For instance, when $G=\mathbb{R}$, then everything reduces to $H=\mathbb{Z}$, and in this case, a function only has to be perturbed near the endpoints of the interval $[0,1]$ to make the endpoints have the same value, and thus one gets an honest $\mathbb{Z}$-periodic function near the original one. However, I have difficulty figuring out what to do in the general, abstract setup.

**Assumptions that I am willing to add, but are probably red herrings:** $G$ second-countable, $H$ normal, $A$ separable.