<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_delayed(self, parent, rule_function, child_names):
 """Create an aggregation rule before child sensors are present. Parameters parent : :class:`katcp.Sensor` object The aggregate sensor. rule_function : f(parent, children) Function to update the parent sensor value. child_names : sequence of str The names of the sensors the aggregate sensor depends on. These sensor must be registered using :meth:`register_sensor` to become active. """

        if parent in self._aggregates or parent in self._incomplete_aggregates:
            raise ValueError("Sensor %r already has an aggregate rule"
                             " associated" % parent)
        reg = self._registered_sensors
        names = set(name for name in child_names if name not in reg)
        sensors = set(reg[name] for name in child_names if name in reg)
        if names:
            self._incomplete_aggregates[parent] = (rule_function, names,
                                                   sensors)
        else:
            self.add(parent, rule_function, sensors)