class_docstr: An on-disk workspace that tracks disposable work directories inside it.
  If a process crashes or another event left stale directories behind,
  this will be detected and the directories purged.
class_docstr_tok: ["An","on-disk","workspace","that","tracks","disposable","work","directories","inside","it",".","If","a","process","crashes","or","another","event","left","stale","directories","behind",",","this","will","be","detected","and","the","directories","purged","."]
code: def _global_lock(self, **kwargs):
      return locket.lock_file(self._global_lock_path, **kwargs)
  
imports: from __future__ import annotations
  import glob
  import logging
  import os
  import shutil
  import stat
  import sys
  import tempfile
  import weakref
  from typing import ClassVar
  import locket
  import dask
label_desc: Use image node_id 3 for calling the WorkSpace obj's underlying member method code with example usage: obj._global_lock() and returns: locket