code: def are_node_disjoint_paths(G, paths):
      if not paths:
          return False
      for path in paths:
          assert is_path(G, path)
      # first and last nodes are source and target
      st = {paths[0][0], paths[0][-1]}
      num_of_nodes = len(
          [n for path in paths for n in path if n not in st]
      )
      num_unique_nodes = len(
          {n for path in paths for n in path if n not in st}
      )
      if num_of_nodes == num_unique_nodes:
          return True
      return False
  
imports: import pytest
  import networkx
  from networkx.algorithms import flow
  from networkx.utils import pairwise
label_desc: Use image node_id 3 for calling a global function with example usage: are_node_disjoint_paths(G, paths) and returns: False, False, True