
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 universal set $U = R$, non-empty sets $A = \left\{x | \frac{x-2}{x-3} < 0\right\}$, $B = \left\{x | (x-a)(x-a^2-2) < 0\right\}$.

$(1)$ When $a = \frac{1}{2}$, find $(\complement_U B) \cup A$.

$(2)$ Let proposition $p: x \in A$, proposition $q: x \in B$. If $q$ is a necessary but not sufficient condition for $p$, find the range of real number $a$.

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