code: def stop_global_driver(force=False):
          
          address, pid = _read_driver()
          if address is None:
              return
  
          if not force:
              # Attempt to connect first, errors on failure
              try:
                  Client(address=address)
              except ConnectionError:
                  if pid_exists(pid):
                      # PID exists, but we can't connect, reraise
                      raise
                  # PID doesn't exist, continue cleanup as normal
          try:
              os.kill(pid, signal.SIGTERM)
          except OSError as exc:
              # If we're forcing a kill, ignore EPERM as well, as we're not sure
              # if the process is a driver.
              ignore = (errno.ESRCH, errno.EPERM) if force else (errno.ESRCH,)
              if exc.errno not in ignore:  # pragma: no cover
                  raise
  
          try:
              os.remove(os.path.join(properties.config_dir, 'driver'))
          except OSError:  # pragma: no cover
              pass
docs: Stops the global driver if running.
  
          No-op if no global driver is running.
  
          Parameters
          ----------
          force : bool, optional
              By default skein will check that the process associated with the
              driver PID is actually a skein driver. Setting ``force`` to
              ``True`` will kill the process in all cases.