<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def window(self, window_name):
 """ Switches focus to the specified window. :Args: - window_name: The name or window handle of the window to switch to. :Usage: :: driver.switch_to.window('main') """

        if self._driver.w3c:
            self._w3c_window(window_name)
            return
        data = {'name': window_name}
        self._driver.execute(Command.SWITCH_TO_WINDOW, data)