def _set_expressions(self, expressions):
Symbolic_core._set_expressions(self, expressions)<EOL>Symbolic_core._set_variables(self, self.cacheable)<EOL>for x, z in zip(self.variables['<STR_LIT:X>'], self.variables['<STR_LIT>']):<EOL><INDENT>expressions['<STR_LIT>'] = expressions['<STR_LIT>'].subs(z, x)<EOL><DEDENT>Symbolic_core._set_expressions(self, expressions)<EOL>
This method is overwritten because we need to modify kdiag by substituting z for x. We do this by calling the parent expression method to extract variables from expressions, then subsitute the z variables that are present with x.