code: def get_pipelines(graph: "DiGraph"):
      import networkx as nx
  
      return [
          graph.subgraph(c).copy()
          for c in nx.weakly_connected_components(graph)
      ]
  
file_path: dvc/dvc/repo/graph.py
imports: from typing import TYPE_CHECKING, Any, Iterator, List, Optional, Set, TypeVar
  from dvc.fs import localfs
  from dvc.utils.fs import path_isin
label_desc: Use image node_id 3 for calling a global function with example usage: get_pipelines(graph) and returns: unknown