code: def setval(self, varname, value):
          
          if varname in self:
              self[varname]['value'] = value
          else:
              self[varname] = Variable(self.default_type, value=value)
docs: Set the value of the variable with the given name.