code: def get_num_workers() -> int:
      num_workers = None
      if hasattr(os, "sched_getaffinity"):
          try:
              num_workers = len(os.sched_getaffinity(0)) // 2
          except Exception:
              pass
      if num_workers is None:
          num_workers = os.cpu_count() // 2
      return num_workers
  
file_path: pytorch_geometric/examples/multi_gpu/papers100m_gcn_multinode.py
imports: import os
  import time
  import torch
  import torch.distributed
  import torch.nn.functional
  from ogb.nodeproppred import PygNodePropPredDataset
  from torch.nn.parallel import DistributedDataParallel
  from torch_geometric.loader import NeighborLoader
  from torch_geometric.nn import GCNConv
label_desc: Use image node_id 1 for calling a global function with example usage: get_num_workers() and returns: num_workers