Answer
See graph
Work Step by Step
We have to graph a function which passes the Horizontal Test on the intervals $(-\infty,-2]\cup[-2,\infty)$, but not on $(-\infty,\infty)$. This means that there are at least two values $x_1,x_2$ so that $x_1\in(-\infty,-2],x_2\in[-2,\infty)$ and $f(x_1)=f(x_2)$.
In the graph for $-3\in(-\infty,-2]$ and $-1\in[-2,\infty)$ we have $f(-3)=f(-1)$.