code: def _init_graph(self):
      self.daggity_file = "tests/sample_dag.txt"
      data = dowhy.datasets.linear_dataset(
          beta=10,
          num_common_causes=1,
          num_instruments=1,
          # num_frontdoor_variables=1,
          num_effect_modifiers=3,
          num_samples=100,
          num_treatments=1,
          treatment_is_binary=True,
      )
      model = CausalModel(
          data=data["df"],
          treatment=data["treatment_name"],
          outcome=data["outcome_name"],
          graph=self.daggity_file,
          proceed_when_unidentifiable=True,
          test_significance=None,
          missing_nodes_as_confounders=False,
      )
      self.graph_obj = model._graph
  
      # creating nx graph instance
      with open(self.daggity_file, "r") as text_file:
          graph_str = text_file.read()
      graph_str = daggity_to_dot(graph_str)
      # to be used later for a test. Does not include the replace operation
      self.graph_str = graph_str
      graph_str = graph_str.replace("\n", " ")
  
      import pygraphviz as pgv
  
      nx_graph = pgv.AGraph(graph_str, strict=True, directed=True)
      nx_graph = nx.drawing.nx_agraph.from_agraph(nx_graph)
      self.nx_graph = nx_graph
      self.action_node = data["treatment_name"]
      self.outcome_node = data["outcome_name"]
      self.observed_nodes = list(nx_graph.nodes)
      self.observed_nodes.remove("Unobserved Confounders")
  
imports: import networkx
  import pandas
  import pytest
  from flaky import flaky
  from pytest import mark
  import dowhy
  import dowhy.datasets
  from dowhy import CausalModel
  from dowhy.graph import *
  from dowhy.utils.graph_operations import daggity_to_dot
label_desc: Use image node_id 1 for calling the TestCausalGraph obj's underlying member method code with example usage: obj._init_graph() without return types