code: def build_queries(subgraph_id: int) -> List[Query]:
      """
      Creates a tuple of Query objects that contain the information needed to convert query answers into NetworkX graphs.
  
      Args:
          subgraph_id: A uniquely identifiable id used to anchor the results of the queries to a specific subgraph,
          designed so that the user can easily query for segmented subgraphs to be used as batches.
  
      Returns:
          List of Query
      """
      assert (
          subgraph_id == 0
      )  # In this example the graph is small so we don't use any subgraphs
  
      # === Hereditary Feature ===
      hereditary_query = inspect.cleandoc(
          f"""match
             $p isa person;
             $par isa parent;
             $ps(child: $p, parent: $par) isa parentship;
             $diag(patient:$par, diagnosed-disease: $d) isa familial-diagnosis;
             $d isa disease, has name $n;
            """
      )
  
      vars = p, par, ps, d, diag, n = "p", "par", "ps", "d", "diag", "n"
      hereditary_query_graph = (
          QueryGraph()
          .add_vars(vars)
          .add_role_edge(ps, p, "child")
          .add_role_edge(ps, par, "parent")
          .add_role_edge(diag, par, "patient")
          .add_role_edge(diag, d, "diagnosed-disease")
          .add_has_edge(d, n)
      )
  
      # === Consumption Feature ===
      consumption_query = inspect.cleandoc(
          f"""match
             $p isa person;
             $s isa substance, has name $n;
             $c(consumer: $p, consumed-substance: $s) isa consumption, 
             has units-per-week $u;"""
      )
  
      vars = p, s, n, c, u = "p", "s", "n", "c", "u"
      consumption_query_graph = (
          QueryGraph()
          .add_vars(vars)
          .add_has_edge(s, n)
          .add_role_edge(c, p, "consumer")
          .add_role_edge(c, s, "consumed-substance")
          .add_has_edge(c, u)
      )
  
      # === Age Feature ===
      person_age_query = inspect.cleandoc(
          f"""match 
              $p isa person, has age $a; 
             """
      )
  
      vars = p, a = "p", "a"
      person_age_query_graph = (
          QueryGraph().add_vars(vars).add_has_edge(p, a)
      )
  
      # === Risk Factors Feature ===
      risk_factor_query = inspect.cleandoc(
          f"""match 
              $d isa disease; 
              $p isa person; 
              $r(person-at-risk: $p, risked-disease: $d) isa risk-factor; 
             """
      )
  
      vars = p, d, r = "p", "d", "r"
      risk_factor_query_graph = (
          QueryGraph()
          .add_vars(vars)
          .add_role_edge(r, p, "person-at-risk")
          .add_role_edge(r, d, "risked-disease")
      )
  
      # === Symptom ===
      vars = p, s, sn, d, dn, sp, sev, c = (
          "p",
          "s",
          "sn",
          "d",
          "dn",
          "sp",
          "sev",
          "c",
      )
  
      symptom_query = inspect.cleandoc(
          f"""match
             $p isa person;
             $s isa symptom, has name $sn;
             $d isa disease, has name $dn;
             $sp(presented-symptom: $s, symptomatic-patient: $p) isa symptom-presentation, has severity $sev;
             $c(cause: $d, effect: $s) isa causality;
            """
      )
  
      symptom_query_graph = (
          QueryGraph()
          .add_vars(vars)
          .add_has_edge(s, sn)
          .add_has_edge(d, dn)
          .add_role_edge(sp, s, "presented-symptom")
          .add_has_edge(sp, sev)
          .add_role_edge(sp, p, "symptomatic-patient")
          .add_role_edge(c, s, "effect")
          .add_role_edge(c, d, "cause")
      )
  
      # === Diagnosis ===
  
      diag, d, p, dn = "diag", "d", "p", "dn"
  
      diagnosis_query = inspect.cleandoc(
          f"""match
             $p isa person;
             $d isa disease, has name $dn;
             $diag(patient: $p, diagnosed-disease: $d) isa diagnosis;
            """
      )
  
      diagnosis_query_graph = (
          QueryGraph()
          .add_vars([diag])
          .add_vars([d, p, dn])
          .add_role_edge(diag, d, "diagnosed-disease")
          .add_role_edge(diag, p, "patient")
      )
  
      return [
          Query(symptom_query_graph, symptom_query),
          Query(diagnosis_query_graph, diagnosis_query),
          Query(risk_factor_query_graph, risk_factor_query),
          Query(person_age_query_graph, person_age_query),
          Query(consumption_query_graph, consumption_query),
          Query(hereditary_query_graph, hereditary_query),
      ]
  
imports: import argparse
  import inspect
  import os
  import networkx
  import torch
  import torch.nn.functional
  import torch_geometric.transforms
  from torch import as_tensor
  from torch.utils.tensorboard import SummaryWriter
  from torch_geometric.nn import HGTConv
  from typedb.client import *
  from examples.diagnosis.dataset.generate import generate_example_data
  from typedb_ml.networkx.query_graph import QueryGraph, Query
  from typedb_ml.pytorch_geometric.dataset.dataset import DataSet
  from typedb_ml.pytorch_geometric.transform.binary_link_prediction import LinkPredictionLabeller, binary_relations_to_edges, binary_link_prediction_edge_triplets
  from typedb_ml.pytorch_geometric.transform.common import clear_unneeded_fields, store_concepts_by_type
  from typedb_ml.pytorch_geometric.transform.encode import FeatureEncoder, CategoricalEncoder, ContinuousEncoder
  from typedb_ml.typedb.load import load_typeql_file, FileType
  from typedb_ml.typedb.type import get_thing_types
label_desc: Use image node_id 3 for calling a global function with example usage: build_queries(subgraph_id) and returns: list