def _check_forest(self, sensors):
        """Validate that this sensor doesn't end up referencing itself."""
        if self in sensors:
            raise ValueError('Circular dependency in sensors: %s is its own'
                             'parent.' % (self.name,))
        sensors.add(self)
        for parent in self._parents:
            parent._check_forest(sensors)
Validate that this sensor doesn't end up referencing itself.