code: def layerwise_infer(
      device, graph, nid, model, num_classes, batch_size, fused_sampling
  ):
      model.eval()
      pred = model.inference(
          graph, device, batch_size, fused_sampling
      )  # pred in buffer_device.
      pred = pred[nid]
      label = graph.ndata["label"][nid].to(pred.device)
      return MF.accuracy(
          pred, label, task="multiclass", num_classes=num_classes
      )
  
file_path: dgl/examples/sampling/node_classification.py
imports: import argparse
  import time
  import dgl
  import dgl.nn
  import torch
  import torch.nn
  import torch.nn.functional
  import torchmetrics.functional
  import tqdm
  from dgl.data import AsNodePredDataset
  from dgl.dataloading import DataLoader, MultiLayerFullNeighborSampler, NeighborSampler
  from ogb.nodeproppred import DglNodePropPredDataset
label_desc: Use image node_id 2 for calling a global function with example usage: layerwise_infer(device, graph, nid, model, num_classes, batch_size, fused_sampling) and returns: MF