code: def deepsnap_ego(args, pyg_dataset):
      avg_time = 0
      task = "graph"
      for i in range(args.num_runs):
          if args.print_run:
              print("Run {}".format(i + 1))
          graphs = GraphDataset.pyg_to_graphs(
              pyg_dataset, verbose=True, netlib=netlib
          )
          dataset = GraphDataset(graphs, task=task)
          datasets = {}
          (
              datasets["train"],
              datasets["val"],
              datasets["test"],
          ) = dataset.split(
              transductive=False,
              split_ratio=[0.8, 0.1, 0.1],
              shuffle=False,
          )
          dataloaders = {
              split: DataLoader(
                  dataset,
                  collate_fn=Batch.collate(),
                  batch_size=1,
                  shuffle=False,
              )
              for split, dataset in datasets.items()
          }
          s = time.time()
          for batch in dataloaders["train"]:
              batch = batch.apply_transform(
                  ego_nets, update_tensor=True
              )
          avg_time += time.time() - s
      print(
          "DeepSNAP has average time: {}".format(
              avg_time / args.num_runs
          )
      )
  
file_path: deepsnap/benchmark/transform/ego_net.py
imports: import copy
  import time
  import torch
  import argparse
  import numpy
  from torch.utils.data import DataLoader
  from deepsnap.batch import Batch
  from deepsnap.dataset import GraphDataset
  from torch_geometric.datasets import TUDataset
label_desc: Use image node_id 6 for calling a global function with example usage: deepsnap_ego(args, pyg_dataset) without return types