def _bind_dependency_to_graph(self, dependency):
        self._fail_if_bound_to_other_dependency_manager(dependency)
        dependency.manager = self

        if not self._dependency_graph in dependency:
            self._dependency_graph.add_node(dependency, resolved=False, ready=None)

            # configure the dependency with our runtime environment,
            # letting the dependency get the resource manager, the
            # dependency manager, etc. This enables it to request its
            # own dependencies and/or resources provided.
            dependency.configure(self.runtime_environment)

            # we store the last on_ready the dependency has fired with in order to replay
            # it to consumers that are added to it after the dependency has been initially
            # resolved.
            node_data = self._dependency_graph.node[dependency]
            dependency.on_ready += lambda dependency: node_data.__setitem__('ready', dependency)
            dependency.on_lost += lambda dependency, reason: node_data.__setitem__('ready', None)
dataset/ETHPy150Open foundit/Piped/piped/dependencies.py/DependencyManager._bind_dependency_to_graph/swapped operands of `in`