code: def allocate(self):
          
          self.logger.debug("Allocating environment.")
          self._allocate()
          self.logger.debug("Environment successfully allocated.")
docs: Builds the context and the Hooks.