
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 the set $A=\{x|(x+m)(x-2m-1) < 0\}$, where $m\in\mathbb{R}$, and the set $B=\{x| \frac{1-x}{x+2} > 0\}$.

$(1)$ When $m= \frac{1}{2}$, find $A\cup B$;

$(2)$ If $B\subseteq A$, find the range of the real number $m$.

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