code: def track_time(data):
      dataset = utils.process_data(data)
      device = utils.get_bench_device()
  
      if data == "am":
          batch_size = 64
          n_bases = 40
          l2norm = 5e-4
      elif data == "ogbn-mag":
          batch_size = 1024
          n_bases = 2
          l2norm = 0
      else:
          raise ValueError()
  
      fanouts = [25, 15]
      n_layers = 2
      n_hidden = 64
      dropout = 0.5
      use_self_loop = True
      lr = 0.01
      num_workers = 4
      iter_start = 3
      iter_count = 10
  
      hg = dataset[0]
      category = dataset.predict_category
      num_classes = dataset.num_classes
      train_mask = hg.nodes[category].data.pop("train_mask")
      train_idx = th.nonzero(train_mask, as_tuple=False).squeeze()
      labels = hg.nodes[category].data.pop("labels").to(device)
      num_of_ntype = len(hg.ntypes)
      num_rels = len(hg.canonical_etypes)
  
      node_feats = []
      for ntype in hg.ntypes:
          if (
              len(hg.nodes[ntype].data) == 0
              or "feat" not in hg.nodes[ntype].data
          ):
              node_feats.append(None)
          else:
              feat = hg.nodes[ntype].data.pop("feat")
              node_feats.append(feat.share_memory_())
  
      # get target category id
      category_id = len(hg.ntypes)
      for i, ntype in enumerate(hg.ntypes):
          if ntype == category:
              category_id = i
      g = dgl.to_homogeneous(hg)
      u, v, eid = g.all_edges(form="all")
  
      # global norm
      _, inverse_index, count = th.unique(
          v, return_inverse=True, return_counts=True
      )
      degrees = count[inverse_index]
      norm = th.ones(eid.shape[0]) / degrees
      norm = norm.unsqueeze(1)
      g.edata["norm"] = norm
      g.edata["etype"] = g.edata[dgl.ETYPE]
      g.ndata["type_id"] = g.ndata[dgl.NID]
      g.ndata["ntype"] = g.ndata[dgl.NTYPE]
  
      node_ids = th.arange(g.num_nodes())
      # find out the target node ids
      node_tids = g.ndata[dgl.NTYPE]
      loc = node_tids == category_id
      target_nids = node_ids[loc]
      train_nids = target_nids[train_idx]
  
      g = g.formats("csc")
      sampler = dgl.dataloading.MultiLayerNeighborSampler(fanouts)
      loader = dgl.dataloading.DataLoader(
          g,
          target_nids[train_idx],
          sampler,
          batch_size=batch_size,
          shuffle=True,
          drop_last=False,
          num_workers=num_workers,
      )
  
      # node features
      # None for one-hot feature, if not none, it should be the feature tensor.
      #
      embed_layer = RelGraphEmbedLayer(
          device,
          g.num_nodes(),
          node_tids,
          num_of_ntype,
          node_feats,
          n_hidden,
          sparse_emb=True,
      )
  
      # create model
      # all model params are in device.
      model = EntityClassify(
          device,
          g.num_nodes(),
          n_hidden,
          num_classes,
          num_rels,
          num_bases=n_bases,
          num_hidden_layers=n_layers - 2,
          dropout=dropout,
          use_self_loop=use_self_loop,
          layer_norm=False,
      )
  
      embed_layer = embed_layer.to(device)
      model = model.to(device)
  
      all_params = itertools.chain(
          model.parameters(), embed_layer.embeds.parameters()
      )
      optimizer = th.optim.Adam(all_params, lr=lr, weight_decay=l2norm)
      emb_optimizer = th.optim.SparseAdam(
          list(embed_layer.node_embeds.parameters()), lr=lr
      )
  
      print("start training...")
      model.train()
      embed_layer.train()
  
      # Enable dataloader cpu affinitization for cpu devices (no effect on gpu)
      with loader.enable_cpu_affinity():
          for step, sample_data in enumerate(loader):
              input_nodes, output_nodes, blocks = sample_data
              feats = embed_layer(
                  input_nodes,
                  blocks[0].srcdata["ntype"],
                  blocks[0].srcdata["type_id"],
                  node_feats,
              )
              logits = model(blocks, feats)
              seed_idx = blocks[-1].dstdata["type_id"]
              loss = F.cross_entropy(logits, labels[seed_idx])
              optimizer.zero_grad()
              emb_optimizer.zero_grad()
  
              loss.backward()
              optimizer.step()
              emb_optimizer.step()
  
              # start timer at before iter_start
              if step == iter_start - 1:
                  t0 = time.time()
              elif (
                  step == iter_count + iter_start - 1
              ):  # time iter_count iterations
                  break
  
      t1 = time.time()
  
      return (t1 - t0) / iter_count
  
imports: import itertools
  import time
  import dgl
  import dgl.nn.pytorch
  import torch
  import torch.multiprocessing
  import torch.nn
  import torch.nn.functional
  import torch.optim
  from dgl.nn import RelGraphConv
  from torch.utils.data import DataLoader
  from ..None import utils
label_desc: Use image node_id 1 for calling a global function with example usage: track_time(data) and returns: unknown