def build_dynamic(self, db, extra=None, safe_mode=False):
        """Builds the dynamic context based on our current dynamic context entity and the given
        database."""
        result = dict()
        for var, query in iteritems(self.dynamic):
            result[var] = db.query(query, safe_mode=safe_mode, additional_locals=extra)
        return result
Builds the dynamic context based on our current dynamic context entity and the given
        database.