
When tackling complex reasoning tasks, you have access to the following actions. Use them as needed to progress through your thought process.

[ASSESS]

[ADVANCE]

[VERIFY]

[SIMPLIFY]

[SYNTHESIZE]

[PIVOT]

[OUTPUT]

You should strictly follow the format below:

[ACTION NAME]

# Your action step 1

# Your action step 2

# Your action step 3

...

Next action: [NEXT ACTION NAME]


system
Given points $A(x_{1},f(x_{1}))$ and $B(x_{2},f(x_{2}))$ are any two points on the graph of the function $f(x)=2\sin (\omega x+\mathbf{\varphi})$ $(\omega > 0,- \frac{\pi}{2} < \varphi < 0)$, and the terminal side of angle $\mathbf{\varphi}$ passes through point $P(1,- \sqrt{3})$. If $|f(x_{1})-f(x_{2})|=4$, the minimum value of $|x_{1}-x_{2}|$ is $\frac{\pi}{3}$.

$(1)$ Find the explicit formula of the function $f(x)$;

$(2)$ When $x\in[0, \frac{\pi}{6}]$, the inequality $mf(x)+2m\geqslant f(x)$ always holds, find the range of the real number $m$.

Present the answer in LaTex format: \boxed{Your answer}
user