code: def canonify(self):
          
  
          for k, v in self.optdict.items():
              if v == False:
                  self.optdict.pop(k)
              elif v == True:
                  self.optdict.pop(k)
                  self.optlist.add(v)
              else:
                  self.optdict[k] = str(v)
docs: Transform self to an equivalent canonical form:
          delete optdict keys with False value, move optdict keys
          with True value to optlist, stringify other values.