code: def plot_local_insights(
      causal_graph: DirectedGraph,
      evaluation_result: Union[EvaluationResult, Dict],
      method: Optional[str] = FalsifyConst.VALIDATE_LMC,
  ):
      """
      For some given graph and evaluation result plot local violations.
      :param causal_graph: DiGraph
      :param evaluation_result: EvaluationResult
      :param method: Method for which to plot violations
      """
      colors = {}
      if (
          isinstance(evaluation_result, EvaluationResult)
          and method in evaluation_result.summary
      ):
          local_insight_dict = evaluation_result.summary[method][
              FalsifyConst.LOCAL_VIOLATION_INSIGHT
          ]
      elif (
          isinstance(evaluation_result, EvaluationResult)
          and hasattr(evaluation_result, "suggestions")
          and method in evaluation_result.suggestions
      ):
          local_insight_dict = evaluation_result.suggestions[method][
              FalsifyConst.P_VALUES
          ]
      elif isinstance(evaluation_result, Dict):
          if method not in evaluation_result:
              raise ValueError(
                  f"Validation method {method} does not exist in given evaluation_result!"
              )
          if FalsifyConst.P_VALUES not in evaluation_result[method]:
              raise ValueError(
                  f"Validation method {method} has no key {FalsifyConst.P_VALUES} where information on local violations "
                  f"are stored!"
              )
          local_insight_dict = evaluation_result[method][
              FalsifyConst.P_VALUES
          ]
      else:
          raise ValueError(
              f"Cannot plot local violation insights from method {method} in evaluation_result!"
          )
  
      for nodes, result in local_insight_dict.items():
          if result[1]:
              if method == FalsifyConst.VALIDATE_LMC:
                  # For LMC we highlight X for which X _|/|_ Y \in ND_X | Pa_X
                  colors[nodes[0]] = VIOLATION_COLOR
              elif method == FalsifyConst.VALIDATE_PD:
                  # For PD we highlight the edge (if Y\in Anc_X -> X are adjacent)
                  colors[(nodes[1], nodes[0])] = VIOLATION_COLOR
              elif method == FalsifyConst.VALIDATE_CM:
                  # For causal minimality we highlight the edge Y \in Pa_X -> X
                  colors[(nodes[1], nodes[0])] = VIOLATION_COLOR
  
      plot(causal_graph, colors=colors)
  
imports: import warnings
  from dataclasses import dataclass, field
  from enum import Enum, auto
  from functools import partial
  from inspect import getfullargspec
  from itertools import permutations
  from typing import Any, Callable, Dict, FrozenSet, List, Optional, Set, Tuple, Union
  import matplotlib.colors
  import matplotlib.pyplot
  import networkx
  import numpy
  import pandas
  from joblib import Parallel, delayed
  from tqdm import tqdm
  import dowhy.gcm.config
  from dowhy.gcm.independence_test import kernel_based
  from dowhy.gcm.util import plot
  from dowhy.gcm.util.general import set_random_seed
  from dowhy.graph import DirectedGraph, get_ordered_predecessors
label_desc: Use image node_id 9 for calling a global function with example usage: plot_local_insights(causal_graph, evaluation_result, method) without return types