[UAA] declare undefined variables and import necessary things inside to hook.py