code: def generate_example_data(client, num_examples, database="diagnosis"):
      session = client.session(database, SessionType.DATA)
  
      pmf_array = np.zeros([2, 2, 2, 2, 3, 2, 3], dtype=np.float)
      # Diabetes Type II
      pmf_array[1, 0, 1, 0, 0, 0, 0] = 0.05
      pmf_array[1, 0, 1, 0, 2, 0, 0] = 0.1
      pmf_array[1, 0, 0, 1, 0, 0, 0] = 0.2
      pmf_array[1, 0, 0, 1, 0, 1, 0] = 0.15
      pmf_array[1, 0, 1, 1, 0, 0, 0] = 0.05
      pmf_array[1, 0, 1, 1, 2, 1, 2] = 0.1
      # Multiple Sclerosis
      pmf_array[0, 1, 0, 1, 0, 0, 0] = 0.1
      pmf_array[0, 1, 1, 0, 0, 0, 0] = 0.05
      pmf_array[0, 1, 1, 1, 0, 0, 0] = 0.05
      pmf_array[0, 1, 1, 1, 0, 0, 1] = 0.05
      pmf_array[0, 1, 1, 1, 0, 0, 2] = 0.1
  
      pmf = PMF(
          {
              "Diabetes Type II": [False, {"age": normal_dist(45, 10)}],
              "Multiple Sclerosis": [
                  False,
                  {"age": normal_dist(30, 10)},
              ],
              "Fatigue": [False, {"severity": normal_dist(0.3, 0.1)}],
              "Blurred vision": [
                  False,
                  {"severity": normal_dist(0.5, 0.2)},
              ],
              "Drinking": [
                  False,
                  {"units-per-week": normal_dist(5, 1)},
                  {"units-per-week": normal_dist(20, 3)},
              ],
              "Parent has Diabetes Type II": [False, True],
              "Cigarettes": [
                  False,
                  {"units-per-week": normal_dist(5, 1)},
                  {"units-per-week": normal_dist(20, 3)},
              ],
          },
          pmf_array,
          seed=0,
      )
  
      for example_id in range(0, num_examples):
          tx = session.transaction(TransactionType.WRITE)
          for query in get_example_queries(pmf, example_id):
              tx.query().insert(query)
          tx.commit()
  
      session.close()
  
imports: import inspect
  import numpy
  from typedb.client import *
  from examples.diagnosis.dataset.pmf import PMF
label_desc: Use image node_id 2 for calling a global function with example usage: generate_example_data(client, num_examples, database) without return types