How do I explain how the analytic function looks like? I have the following problem.

We have given $g$ to be an analytic function such that for $|z-z_0|<R$ we have $$|g(z)|\leq M$$. We assume that $g$ have a zero of order $m$ at $z_0$. Then I have shown what $$|g(z)|\leq \frac{M}{R^m}|z-z_0|^m~~~~~~~~~~(1)$$ Now I assume that above I $(1)$ we have equality. I need to explain how this function looks like.

My claim was the following:

Claim Equality in $(1)$ holds for some $z\neq z_0$ iff $$g(z)=\lambda (z-z_0)^m$$ for some constant $\lambda \in \Bbb{C}$.

I wanted to prove my claim now.
$\Leftarrow$Let us assume that $\lambda\in \Bbb{C}$ is a constant and $g(z)=\lambda (z-z_0)^m$. Then since $
|z-z_0|<R$ we have $|g(z)|<\lambda R^m =:M$. This means that $\lambda=\frac{M}{R^m}$. Then $$|g(z)|=|\lambda||z-z_0|^m=\frac{M}{R^m}|z-z_0|^m$$as we wanted.
$\Rightarrow$ Here assume that $$|g(z)|=\frac{M}{R^m}|z-z_0|^m$$ when $|z-z_0|<R$. Here I know that I need to show that $g(z)=\lambda(z-z_0)^m$ but I don't see why this is true, I thought maybe one could do it using contradiction but then I don't see how I should chose my $g$. My prof. told me that my claim is correct so I really only need to prove this.
Could maybe someone help me with this direction?
Thanks for your help.

Assume $$|g(z)|\le {M\over R^m}|z-z_0|^m,\qquad |z-z_0|<R$$ and
$$|g(w)|= {M\over R^m}|w-z_0|^m$$ for a point $w,$ $|w-z_0|<R.$
Consider the function $$h(z)={g(z)\over (z-z_0)^m},\qquad |z-z_0|<R.$$
This function is analytic in $|z-z_0|<R,$ as $z_0$ is a removable singularity. Moroever $$|h(z)|\le {M\over R^m},\qquad |h(w)|={M\over R^m} $$ From the maximum modulus principle the function $h(z)$ is constant, i.e. $h(z)\equiv \lambda$ for a complex number $\lambda. $  Thus $g(z)=\lambda {M\over R^m}(z-z_0)^m.$
