code: def is_path(G, path):
      return all(v in G[u] for u, v in pairwise(path))
  
imports: import pytest
  import networkx
  from networkx.algorithms import flow
  from networkx.utils import pairwise
label_desc: Use image node_id 1 for calling a global function with example usage: is_path(G, path) and returns: all