code: def der(self, x: Sym):
          
          name = 'der({:s})'.format(x.name())
          if name not in self.scope['dvar'].keys():
              self.scope['dvar'][name] = self.sym.sym(name, *x.shape)
              self.scope['states'].append(x.name())
          return self.scope['dvar'][name]
docs: Get the derivative of the variable, create it if it doesn't exist.