code: def do_x_surgery(self, g, x):
      for xi in x.keys():
          g.remove_edges_from(
              [(parent, child) for (parent, child) in g.in_edges(xi)]
          )
          g.nodes()[xi]["parent_names"] = []
      return g
  
file_path: dowhy/dowhy/do_samplers/mcmc_sampler.py
imports: from typing import List
  import networkx
  import numpy
  import pymc3
  from dowhy import EstimandType
  from dowhy.do_sampler import DoSampler
label_desc: Use image node_id 8 for calling the McmcSampler obj's underlying member method code with example usage: obj.do_x_surgery(g, x) and returns: g