code: def test_all_triplets_deprecated():
      G = nx.DiGraph([(1, 2), (2, 3), (3, 4)])
      with pytest.deprecated_call():
          nx.all_triplets(G)
  
imports: import itertools
  from collections import defaultdict
  from random import sample
  import pytest
  import networkx
label_desc: Use image node_id 1 for calling a global function with example usage: test_all_triplets_deprecated() without return types