code: def acquire(self, timeout=None):
          
          green = getcurrent()
          parent = green.parent
          if parent is None:
              raise MustBeInChildGreenlet('GreenLock.acquire in main greenlet')
  
          if self._local.locked:
              future = create_future(self._loop)
              self._queue.append(future)
              parent.switch(future)
  
          self._local.locked = green
          return self.locked()
docs: Acquires the lock if in the unlocked state otherwise switch
          back to the parent coroutine.