code: def validate_acyclic(causal_graph: DirectedGraph) -> None:
      if has_cycle(causal_graph):
          raise RuntimeError(
              "The graph contains a cycle, but an acyclic graph is expected!"
          )
  
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 4 for calling a global function with example usage: validate_acyclic(causal_graph) without return types