code: def remove_links(self, parent, children):
          
          old_sensors = []
          if parent in self:
              for child in children:
                  if child not in self:
                      continue
                  self._parent_to_children[parent].discard(child)
                  self._child_to_parents[child].discard(parent)
                  if not self._child_to_parents[child] and \
                          not self._parent_to_children[child]:
                      self._remove_sensor(child)
                      old_sensors.append(child)
              if not self._child_to_parents[parent] and \
                      not self._parent_to_children[parent]:
                  self._remove_sensor(parent)
                  old_sensors.append(parent)
  
          for sensor in old_sensors:
              sensor.detach(self)
          self.recalculate(parent, children)
docs: Remove dependency links from parent to child.
  
          Any sensors that have no dependency links are removed from the tree and
          the tree detaches from each sensor removed. After all dependency links
          have been removed the parent is recalculated. Links that don't exist
          are ignored.
  
          Parameters
          ----------
          parent : :class:`katcp.Sensor` object
              The sensor that used to depend on children.
          children : sequence of :class:`katcp.Sensor` objects
              The sensors that parent used to depend on.