code: def _check_forest(self, sensors):
          
          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)
docs: Validate that this sensor doesn't end up referencing itself.