Sufficient condition for inflection point I am a bit confused about the following statement.

Let $f$ be a real function of a real variable and $x_0 \in \mathbb{R}$. If $f$ is differentiable in a neighborhood $I$ of $x_0$, $f'(x_0) = 0$ and $f'(x_0) > 0$ for all $x \in I \setminus \{x_0\}$, then $x_0$ is an inflection point.

Is this statement true? Reading this question:
Prove that $f$ has an inflection point at zero if $f$ is a function that satisfies a given set of hypotheses,
I think my statement is false, but I cannot give a counterexample.
Can anyone help me out?
EDIT. (Thanks to @Zestylemonzi's comment) My definition of inflection point is as follows:

$x_0$ is an inflection point if $f$ is differentiable at $x_0$ and there exists a neighborhood $J$ of $x_0$ such that the function $d(x) = f(x) − f(x_0) − f'(x_0) (x − x_0)$ has the same sign as $x−x_0$ for all $x \in J \setminus \{ x_0 \}$, or $d(x) = f(x) − f(x_0) − f'(x_0) (x − x_0)$ and $x−x_0$ have opposite signs for all $x \in J \setminus \{ x_0 \}$

I think that according to this definition my statement is true. I am aware of another possible definition of inflection point:

$x_0$ is an inflection point if $f$ is differentiable at $x_0$ and there exists $\delta > 0$ such that $f$ is convex (respectively, concave) for $x \in (x_0 - \delta, x_0)$ and concave (respectively, convex) for $x \in (x_0, x_0 + \delta)$.

Is my statement true according to the second definition?
 A: Let's look at the question with the second definition; we will give an example of an $f$ for which the statement does not hold.
For that, we will use a well-known lemma on the characterization of convex functions when differentiability is assumed.

Lemma: Let $I,J\subset \mathbb{R}$ be intervals and $g:I\longrightarrow J$ be differentiable.
  Then $g$ is convex (respectively, concave) if and only if $g'$ is non-decreasing (respectively, non-increasing).

By the lemma, it suffices to find an $f$ as in the question that, in addition, is such that $f'$ is never monotone near $x_0$.
In what follows we assume without loss of generality that $x_0=0$. One example is to take $f$ to be an antiderivative for $h:\mathbb{R}\longrightarrow\mathbb{R}$, given by
$$h(x)=x^2\cdot \exp\left({\sin\left(\frac1x\right)}\right),$$
where of course $h(0)=0$. Observe that $h>0$ when $x\neq 0$.
Moreover, $h$ is continuous, so it is Riemann-integrable and its antiderivative is differentiable.
Finally, $h$ itself is differentiable on $\mathbb{R}\setminus\{0\}$ with
$$h'(x)=\left( 2x-\cos\left(\frac1x\right)\right)\cdot {\underbrace{\exp\left(\sin\left(\frac1x \right)\right)}_{>0}}\,\,\,,$$
so one need only check that $2x-\cos\left(\frac1x\right)$ changes sign infinitely often near $x=0$.
