<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def acquire_lock(self):
 """ 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 """

    if self.options.for_global_scope().lock:
      if not self._lock.acquired:
        self._lock.acquire()