def resolve_initial_state(self):
        """ Resolves the initial state of this dependency.

        If the dependency has all its dependencies satisfied and `cascade_ready` is true,
        `on_ready` is fired.

        Otherwise, if `cascade_lost` is true, `on_lost` is fired.
        """
        if self.manager.has_all_dependencies_provided(self) and self.cascade_ready:
            self.fire_on_ready()
        elif self.cascade_lost:
            self.fire_on_lost(failure.Failure(('%r' % self,), exceptions.InitiallyLost))
dataset/ETHPy150Open foundit/Piped/piped/dependencies.py/Dependency.resolve_initial_state/original