code: def deferFunction(self, callable):
          
          self._deferredFunctions.append((callable, self.scopeStack[:], self.offset))
docs: Schedule a function handler to be called just before completion.
  
          This is used for handling function bodies, which must be deferred
          because code later in the file might modify the global scope. When
          `callable` is called, the scope at the time this is called will be
          restored, however it will contain any new bindings added to it.