code: def get_descendants(graph: nx.DiGraph, nodes):
      descendants = set()
      for node_name in nodes:
          descendants = descendants.union(
              set(nx.descendants(graph, node_name))
          )
      return descendants
  
imports: import itertools
  import logging
  import re
  from abc import abstractmethod
  from typing import Any, List, Protocol
  import networkx
  from networkx.algorithms.dag import has_cycle
  from dowhy.utils.api import parse_state
  from dowhy.utils.graph_operations import daggity_to_dot
label_desc: Use image node_id 10 for calling a global function with example usage: get_descendants(graph, nodes) and returns: descendants