code: def layerwise_infer(
      args, graph, features, test_set, all_nodes_set, model, num_classes
  ):
      model.eval()
      dataloader = create_dataloader(
          graph=graph,
          features=features,
          itemset=all_nodes_set,
          batch_size=4 * args.batch_size,
          fanout=[-1],
          device=args.device,
          num_workers=args.num_workers,
          job="infer",
      )
      pred = model.inference(graph, features, dataloader, args.device)
      pred = pred[test_set._items[0]]
      label = test_set._items[1].to(pred.device)
  
      return MF.accuracy(
          pred,
          label,
          task="multiclass",
          num_classes=num_classes,
      )
  
imports: import argparse
  import time
  import dgl.graphbolt
  import dgl.nn
  import torch
  import torch.nn
  import torch.nn.functional
  import torchmetrics.functional
  from tqdm import tqdm
label_desc: Use image node_id 2 for calling a global function with example usage: layerwise_infer(args, graph, features, test_set, all_nodes_set, model, num_classes) and returns: MF