def package_depends_on(self, name_a, name_b):
assert self._context<EOL>if self._dependency_lookup is None:<EOL><INDENT>self._dependency_graph = self._context.get_dependency_graph()<EOL>self._dependency_lookup = accessibility(self._dependency_graph)<EOL><DEDENT>downstream = self._dependency_lookup.get(name_a, [])<EOL>accessible = (name_b in downstream)<EOL>if accessible:<EOL><INDENT>neighbours = self._dependency_graph.neighbors(name_a)<EOL>return <NUM_LIT:2> if name_b in neighbours else <NUM_LIT:1><EOL><DEDENT>else:<EOL><INDENT>return <NUM_LIT:0><EOL><DEDENT>
Returns dependency information about two packages:

            0: A does not depend, directly or indirectly, on B;
            1: A depends indirectly on B;
            2: A depends directly on B.