code: def add(self, parent, rule_function, children):
          
          if parent in self._aggregates or parent in self._incomplete_aggregates:
              raise ValueError("Sensor %r already has an aggregate rule "
                               "associated" % parent)
          self._aggregates[parent] = (rule_function, children)
          self.add_links(parent, children)
docs: Create an aggregation rule.
  
          Parameters
          ----------
          parent : :class:`katcp.Sensor` object
              The aggregate sensor.
          rule_function : f(parent, children)
              Function to update the parent sensor value.
          children : sequence of :class:`katcp.Sensor` objects
              The sensors the aggregate sensor depends on.