code: def close_window(self, window_name=None, title=None, url=None):
          
          main_window_handle = self.current_window_handle
          self.switch_to_window(window_name, title, url)
          self.close()
          self.switch_to_window(main_window_handle)
docs: WebDriver implements only closing current window. If you want to close
          some window without having to switch to it, use this method.