code: def get_example_queries(pmf, example_id):
      variable_values = pmf.select()
  
      queries = [f"insert $p isa person, has person-id {example_id};"]
  
      if variable_values["Multiple Sclerosis"] is not False:
          queries.append(
              inspect.cleandoc(
                  f"""
                  match
                  $d isa disease, has name "Multiple Sclerosis";
                  $p isa person, has person-id {example_id};
                  insert
                  $diagnosis (patient: $p, diagnosed-disease: $d) isa diagnosis;
                  $p has age {int(variable_values['Multiple Sclerosis']['age']())};"""
              )
          )
  
      if variable_values["Diabetes Type II"] is not False:
          queries.append(
              inspect.cleandoc(
                  f"""                 
                  match
                  $p isa person, has person-id {example_id};
                  $d isa disease, has name "Diabetes Type II";
                  insert
                  $diagnosis (patient: $p, diagnosed-disease: $d) isa diagnosis;
                  $p has age {int(variable_values['Diabetes Type II']['age']())};"""
              )
          )
  
      if variable_values["Fatigue"] is not False:
          queries.append(
              inspect.cleandoc(
                  f"""
                  match
                  $p isa person, has person-id {example_id};
                  $s isa symptom, has name "Fatigue";
                  insert
                  $sp (presented-symptom: $s, symptomatic-patient: $p) isa 
                  symptom-presentation, has severity {variable_values['Fatigue']['severity']()};"""
              )
          )
  
      if variable_values["Blurred vision"] is not False:
          queries.append(
              inspect.cleandoc(
                  f"""
                  match
                  $p isa person, has person-id {example_id};
                  $s isa symptom, has name "Blurred vision";
                  insert
                  $sp (presented-symptom: $s, symptomatic-patient: $p) isa 
                  symptom-presentation, has severity {variable_values['Blurred vision']['severity']()};"""
              )
          )
  
      if variable_values["Drinking"] is not False:
          queries.append(
              inspect.cleandoc(
                  f"""
                  match
                  $p isa person, has person-id {example_id};
                  $s isa substance, has name "Alcohol";
                  insert
                  $c (consumer: $p, consumed-substance: $s) isa consumption, 
                  has units-per-week {int(variable_values['Drinking']['units-per-week']())};"""
              )
          )
  
      if variable_values["Parent has Diabetes Type II"] is not False:
          queries.append(
              inspect.cleandoc(
                  f"""
                  match
                  $p isa person, has person-id {example_id};
                  $d isa disease, has name "Diabetes Type II";
                  insert
                  (parent: $parent, child: $p) isa parentship;
                  $parent isa parent;
                  $diagnosis (patient: $parent, diagnosed-disease: $d) isa familial-diagnosis;
                  """
              )
          )
  
      if variable_values["Cigarettes"] is not False:
          queries.append(
              inspect.cleandoc(
                  f"""
                  match
                  $p isa person, has person-id {example_id};
                  $s isa substance, has name "Cigarettes";
                  insert
                  $c (consumer: $p, consumed-substance: $s) isa consumption, 
                  has units-per-week {int(variable_values['Cigarettes']['units-per-week']())};"""
              )
          )
  
      return queries
  
imports: import inspect
  import numpy
  from typedb.client import *
  from examples.diagnosis.dataset.pmf import PMF
label_desc: Use image node_id 1 for calling a global function with example usage: get_example_queries(pmf, example_id) and returns: queries