def METHOD_NAME(self):
    # Set any variables that have a new value
    logger.debug("Apply variables:")
    for dep in sorted(self._variables, key=lambda d: self.compiler[d]):
        name = self.compiler[dep]
        state_id = dep.state_id
        if self._variable_cache.get(dep, None) != state_id:
            self[name] = dep.value
            self._variable_cache[dep] = state_id
            logger.debug("    %s = %s **", name, dep.value)
        else:
            logger.debug("    %s = %s", name, dep.value)
    # Process any pending variables and discard anything else that is
    # not active in the program (otherwise we get lots of warnings).
    self._process_pending_variables()
    logger.debug("Discarding unused variables before draw: %s" % 
                 self._pending_variables.keys())
    self._pending_variables = {}