code: def examples_per_class(targets):
      result = defaultdict(int)
  
      unique_classes, examples_count = torch.unique(
          torch.as_tensor(targets), return_counts=True
      )
      for unique_idx in range(len(unique_classes)):
          result[int(unique_classes[unique_idx])] = int(
              examples_count[unique_idx]
          )
  
      return result
  
imports: from collections import defaultdict
  from typing import Callable, Dict, List, NamedTuple, Optional, Tuple, Union
  import torch
  from torch import Tensor
  from torch.nn import Linear, Module
  from torch.utils.data import DataLoader, Dataset
  from avalanche.benchmarks import OnlineCLExperience
  from avalanche.models.batch_renorm import BatchRenorm2D
label_desc: Use image node_id 17 for calling a global function with example usage: examples_per_class(targets) and returns: result