code: def accuracy(logits, labels):
      _, indices = torch.max(logits, dim=1)
      correct = torch.sum(indices == labels)
      return correct.item() * 1.0 / len(labels)
  
imports: import argparse
  import os
  import time
  import dgl
  import dgl.function
  import networkx
  import numpy
  import torch
  import torch.backends.cudnn
  import torch.nn
  import torch.nn.functional
  from dgl import DGLGraph
  from dgl.data import load_data, register_data_args
  from scipy import sparse
  from ...modules.graph_construction import NodeEmbeddingBasedGraphConstruction, NodeEmbeddingBasedRefinedGraphConstruction
  from ...modules.utils.vocab_utils import VocabModel
  from ..utils import EarlyStopping
label_desc: Use image node_id 1 for calling a global function with example usage: accuracy(logits, labels) and returns: unknown