I am using PyAutoGUI for the first time, but now I would like to proceed while checking the official documentation.

Reference site:
https://pyautogui.readthedocs.io/en/latest/index. html

After installing the three modules required for mac, we confirmed the following operation,
The process of checking for the presence of a pointer on the screen does not work.

# Import library
import pyautogui
# X, y coordinates of current pointer
pyautogui.position ()
Output result: Point (x = 623, y = 721)
#Return display resolution
pyautogui.size ()
Output result: Size (width = 1920, height = 1080)
# Returns true if the pointer is in the screen
pyautogui.onScreen (x, y)
NameError: name 'x' is not defined

In this case, I think it is necessary to define x and y. Was there any missing preprocessing?
If i know anyone, I would appreciate it if you could tell me.
Thanks for your cooperation.