code: def get_all_nodes(
      graph: nx.DiGraph,
      observed_nodes: List[Any],
      include_unobserved_nodes: bool,
  ) -> List[Any]:
      observed_nodes = set(observed_nodes)
      return [
          node
          for node in graph.nodes
          if include_unobserved_nodes or node in observed_nodes
      ]
  
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 12 for calling a global function with example usage: get_all_nodes(graph, observed_nodes, include_unobserved_nodes) and returns: unknown