code: def as_dictionary(self):
          
          condition_dict = {
              "name": self.name,
              "timelock": self.timelock,
              "timeout": self.timeout,
              "contractName": self.contract_name,
              "functionName": self.function_name,
              "events": [e.as_dictionary() for e in self.events],
              "parameters": [p.as_dictionary() for p in self.parameters],
          }
  
          return condition_dict
docs: Return the condition as a dictionary.
  
          :return: dict