<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_rect(self):
 """ Get rectangle of app or desktop resolution Returns: RECT(left, top, right, bottom) """

        if self.handle:
            left, top, right, bottom = win32gui.GetWindowRect(self.handle)
            return RECT(left, top, right, bottom)
        else:
            desktop = win32gui.GetDesktopWindow()
            left, top, right, bottom = win32gui.GetWindowRect(desktop)
            return RECT(left, top, right, bottom)