code: def test_all_pairs_lca_bug_gh4942(self):
      G = nx.DiGraph([(0, 2), (1, 2), (2, 3)])
      ans = list(all_pairs_lca(G))
      assert len(ans) == 9
  
imports: from itertools import chain, combinations, product
  import pytest
  import networkx
label_desc: Use image node_id 12 for calling the TestDAGLCA obj's underlying member method code with example usage: obj.test_all_pairs_lca_bug_gh4942() without return types