code: def set_dataset_info(dataset):
      r"""Set global dataset information.
  
      Args:
          dataset: PyG dataset object
  
      """
      # get dim_in and dim_out
      try:
          cfg.share.dim_in = dataset._data.x.shape[1]
      except Exception:
          cfg.share.dim_in = 1
      try:
          if cfg.dataset.task_type == "classification":
              cfg.share.dim_out = torch.unique(dataset._data.y).shape[0]
          else:
              cfg.share.dim_out = dataset._data.y.shape[1]
      except Exception:
          cfg.share.dim_out = 1
  
      # count number of dataset splits
      cfg.share.num_splits = 1
      for key in dataset._data.keys():
          if "val" in key:
              cfg.share.num_splits += 1
              break
      for key in dataset._data.keys():
          if "test" in key:
              cfg.share.num_splits += 1
              break
  
file_path: pytorch_geometric/torch_geometric/graphgym/loader.py
imports: import os.path
  from typing import Callable
  import torch
  import torch_geometric.graphgym.register
  import torch_geometric.transforms
  from torch_geometric.datasets import PPI, Amazon, Coauthor, KarateClub, MNISTSuperpixels, Planetoid, QM7b, TUDataset
  from torch_geometric.graphgym.config import cfg
  from torch_geometric.graphgym.models.transform import create_link_label, neg_sampling_transform
  from torch_geometric.loader import ClusterLoader, DataLoader, GraphSAINTEdgeSampler, GraphSAINTNodeSampler, GraphSAINTRandomWalkSampler, NeighborSampler, RandomNodeLoader
  from torch_geometric.utils import index_to_mask, negative_sampling, to_undirected
label_desc: Use image node_id 6 for calling a global function with example usage: set_dataset_info(dataset) without return types