4. (The 10th "Hope Cup" Senior High School 2nd Test) For a periodic function $y=f(x)$ with the smallest positive period $T$, when $x \in(0, T)$, the inverse function is $y=f^{-1}(x)$ (domain $D$). Then, when $x \in(-T, 0)$, the inverse function of $y=f(x)$ is
A. $y=f^{\prime}(x+T), x \in D$
B. $y=f^{1}(x)+T \cdot x \in D$
(. $\left.y=\int^{\prime}(x-T) \cdot x \in I\right)$
D. $y=f^{\prime}(x)-T \cdot x \in D$
4. D To find the inverse function of $f(x)$ when $x \in(-T, 0)$, we need to transform the interval to $(0, T)$. Given that the smallest positive period is $T$, when $x \in(-T, 0)$,
$$
y=f(x)=f(x+T),
$$

at this time,
$$
x+T \in(0, T),
$$

thus,
$$
x+T=f^{-1}(y), x=f^{-1}(y)-T,
$$
swapping $x$ and $y$ gives $y=f^{-1}(x)-T$. Therefore, the answer is D.