code: def get_accuracy(logits, targets):
      """Compute the accuracy (after adaptation) of MAML on the test/query points
  
      Parameters
      ----------
      logits : `torch.FloatTensor` instance
          Outputs/logits of the model on the query points. This tensor has shape
          `(num_examples, num_classes)`.
  
      targets : `torch.LongTensor` instance
          A tensor containing the targets of the query points. This tensor has
          shape `(num_examples,)`.
  
      Returns
      -------
      accuracy : `torch.FloatTensor` instance
          Mean accuracy on the query points
      """
      _, predictions = torch.max(logits, dim=-1)
      return torch.mean(predictions.eq(targets).float())
  
file_path: pytorch-meta/examples/maml-higher/train.py
imports: import os
  import torch
  import torch.nn
  import torch.nn.functional
  from tqdm import tqdm
  import logging
  from collections import OrderedDict
  import higher
  from torchmeta.datasets.helpers import omniglot
  from torchmeta.utils.data import BatchMetaDataLoader
label_desc: Use image node_id 2 for calling a global function with example usage: get_accuracy(logits, targets) and returns: torch