code: def compute_acc_unsupervised(
      emb, labels, train_nids, val_nids, test_nids
  ):
      """
      Compute the accuracy of prediction given the labels.
      """
      emb = emb.cpu().numpy()
      labels = labels.cpu().numpy()
      train_nids = train_nids.cpu().numpy()
      train_labels = labels[train_nids]
      val_nids = val_nids.cpu().numpy()
      val_labels = labels[val_nids]
      test_nids = test_nids.cpu().numpy()
      test_labels = labels[test_nids]
      emb = (emb - emb.mean(0, keepdims=True)) / emb.std(
          0, keepdims=True
      )
      lr = lm.LogisticRegression(
          multi_class="multinomial", max_iter=10000
      )
      lr.fit(emb[train_nids], train_labels)
      pred = lr.predict(emb)
      f1_micro_eval = skm.f1_score(
          val_labels, pred[val_nids], average="micro"
      )
      f1_micro_test = skm.f1_score(
          test_labels, pred[test_nids], average="micro"
      )
      return f1_micro_eval, f1_micro_test
  
imports: import argparse
  import os
  import time
  import dgl.function
  import dgl.nn
  import numpy
  import sklearn.linear_model
  import sklearn.metrics
  import torch
  import torch.distributed
  import torch.multiprocessing
  import torch.nn
  import torch.nn.functional
  import tqdm
  from dgl.data import AsNodePredDataset, RedditDataset
  from dgl.dataloading import as_edge_prediction_sampler, DataLoader, MultiLayerFullNeighborSampler, NeighborSampler
  from dgl.multiprocessing import shared_tensor
  from ogb.nodeproppred import DglNodePropPredDataset
  from torch.nn.parallel import DistributedDataParallel
label_desc: Use image node_id 1 for calling a global function with example usage: compute_acc_unsupervised(emb, labels, train_nids, val_nids, test_nids) and returns: f1_micro_eval,  f1_micro_test