code: def acquire_lock(self):
      
      if self.options.for_global_scope().lock:
        if not self._lock.acquired:
          self._lock.acquire()
docs: Acquire the global lock for the root directory associated with this context. When
      a goal requires serialization, it will call this to acquire the lock.
  
      :API: public