docs: def _clear_xauth(self):
          '''
          Clear the Xauthority file and restore the environment variables.
          '''
          os.remove(self._xauth_filename)
          for varname in ['AUTHFILE', 'XAUTHORITY']:
              if self._old_xauth[varname] is None:
                  del os.environ[varname]
              else:
                  os.environ[varname] = self._old_xauth[varname]
          self._old_xauth = None