code: def validate_node_in_graph(causal_graph: HasNodes, node: Any) -> None:
      if node not in causal_graph.nodes:
          raise ValueError(
              "Node %s can not be found in the given graph!" % node
          )
  
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 5 for calling a global function with example usage: validate_node_in_graph(causal_graph, node) without return types