code: def create_gml_graph(
      treatments,
      outcome,
      common_causes,
      instruments,
      effect_modifiers=[],
      frontdoor_variables=[],
  ):
      gml_graph = (
          "graph[directed 1" 'node[ id "{0}" label "{0}"]'
      ).format(outcome)
  
      gml_graph += " ".join(
          [
              'node[ id "{0}" label "{0}"]'.format(v)
              for v in common_causes
          ]
      )
      gml_graph += " ".join(
          ['node[ id "{0}" label "{0}"]'.format(v) for v in instruments]
      )
      gml_graph += " ".join(
          [
              'node[ id "{0}" label "{0}"]'.format(v)
              for v in frontdoor_variables
          ]
      )
      for currt in treatments:
          gml_graph += ('node[ id "{0}" label "{0}"]').format(currt)
          if len(frontdoor_variables) == 0:
              gml_graph += 'edge[source "{0}" target "{1}"]'.format(
                  currt, outcome
              )
          gml_graph += " ".join(
              [
                  'edge[ source "{0}" target "{1}"]'.format(v, currt)
                  for v in common_causes
              ]
          )
          gml_graph += " ".join(
              [
                  'edge[ source "{0}" target "{1}"]'.format(v, currt)
                  for v in instruments
              ]
          )
          gml_graph += " ".join(
              [
                  'edge[ source "{0}" target "{1}"]'.format(currt, v)
                  for v in frontdoor_variables
              ]
          )
  
      gml_graph = gml_graph + " ".join(
          [
              'edge[ source "{0}" target "{1}"]'.format(v, outcome)
              for v in common_causes
          ]
      )
      gml_graph = gml_graph + " ".join(
          [
              'node[ id "{0}" label "{0}"] edge[ source "{0}" target "{1}"]'.format(
                  v, outcome
              )
              for v in effect_modifiers
          ]
      )
      gml_graph = gml_graph + " ".join(
          [
              'edge[ source "{0}" target "{1}"]'.format(v, outcome)
              for v in frontdoor_variables
          ]
      )
      for v1 in common_causes:
          gml_graph = gml_graph + " ".join(
              [
                  'edge[ source "{0}" target "{1}"]'.format(v1, v2)
                  for v2 in frontdoor_variables
              ]
          )
      gml_graph = gml_graph + "]"
      return gml_graph
  
imports: import math
  import string
  import networkx
  import numpy
  import pandas
  import scipy.stats
  from numpy.random import choice
  from scipy.stats import bernoulli, halfnorm, poisson, uniform
  from sklearn.neural_network import MLPRegressor
  from dowhy.utils.graph_operations import add_edge, del_edge, get_random_node_pair, get_simple_ordered_tree
label_desc: Use image node_id 9 for calling a global function with example usage: create_gml_graph(treatments, outcome, common_causes, instruments, effect_modifiers, frontdoor_variables) and returns: gml_graph