code: def infer_task():
      num_label = cfg.share.dim_out
      if cfg.dataset.task_type == "classification":
          if num_label <= 2:
              task_type = "classification_binary"
          else:
              task_type = "classification_multi"
      else:
          task_type = cfg.dataset.task_type
      return task_type
  
imports: import logging
  import math
  import sys
  import torch
  import graphgym.register
  from graphgym.config import cfg
  from graphgym.utils.device import get_current_gpu_usage
  from graphgym.utils.io import dict_to_json, dict_to_tb, makedirs
label_desc: Use image node_id 2 for calling a global function with example usage: infer_task() and returns: task_type