<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def switch_to_window(self, window_name=None, title=None, url=None):
 """ WebDriver implements switching to other window only by it's name. With wrapper there is also option to switch by title of window or URL. URL can be also relative path. """

        if window_name:
            self.switch_to.window(window_name)
            return

        if url:
            url = self.get_url(path=url)

        for window_handle in self.window_handles:
            self.switch_to.window(window_handle)
            if title and self.title == title:
                return
            if url and self.current_url == url:
                return
        raise selenium_exc.NoSuchWindowException('Window (title=%s, url=%s) not found.' % (title, url))