code: def get_dict(self):
          
          out = {
              property_name: getattr(self, property_name)
              for property_name in self._property_names
          }
  
          if "frequency" in out:
              out["frequency"] = int(out["frequency"])
  
          return out
docs: Convert all rules to dict and return them.