Let $S^k$ be a topological $k$-dimensional sphere. Let $D^k$ be a $k$ dimensional disk that includes in $S^k$. Let $q: D^k \to D^r$ be a map and $r \leq k$. Let $$W = S^k \sqcup D^r/\sim$$ where $S^k \supset D^k \ni x \sim q(x)$ is the equivalence relation (one can also express $W$ it as pushout of the inclusion map and $q$).
$Q:$ Under what conditions on $q$, the space $W$ is homeomorphic to $S^k$?
Edit: All the disks mentioned above are closed disk.
One of the conditions that I think of is if $q^{-1}(pt)$ is contractible for every $pt \in D^r$. Is this a sufficient condition?