class_docstr: Target transform to return labels in `[0, num_classes)`.
  
  Parameters
  ----------
  num_classes : int, optional
      Number of classes. If `None`, then the number of classes is inferred
      from the number of individual labels encountered.
  
  Examples
  --------
  >>> dataset = Omniglot('data', num_classes_per_task=5, meta_train=True)
  >>> task = dataset.sample_task()
  >>> task[0]
  (<PIL.Image.Image image mode=L size=105x105 at 0x11EC797F0>,
  ('images_evaluation/Glagolitic/character12', None))
  
  >>> dataset = Omniglot('data', num_classes_per_task=5, meta_train=True,
  ... target_transform=Categorical(5))
  >>> task = dataset.sample_task()
  >>> task[0]
  (<PIL.Image.Image image mode=L size=105x105 at 0x11ED3F668>, 2)
class_docstr_tok: ["Target","transform","to","return","labels","in","`","[","0",",","num_classes",")","`",".","Parameters","--","--","--","--","--","num_classes",":","int",",","optional","Number","of","classes",".","If","`","None","`",",","then","the","number","of","classes","is","inferred","from","the","number","of","individual","labels","encountered",".","Examples","--","--","--","--",">",">",">","dataset","=","Omniglot","(","'data","'",",","num_classes_per_task=5",",","meta_train=True",")",">",">",">","task","=","dataset.sample_task","(",")",">",">",">","task","[","0","]","(","<","PIL.Image.Image","image","mode=L","size=105x105","at","0x11EC797F0",">",",","(","'images_evaluation\/Glagolitic\/character12","'",",","None",")",")",">",">",">","dataset","=","Omniglot","(","'data","'",",","num_classes_per_task=5",",","meta_train=True",",","...","target_transform=Categorical","(","5",")",")",">",">",">","task","=","dataset.sample_task","(",")",">",">",">","task","[","0","]","(","<","PIL.Image.Image","image","mode=L","size=105x105","at","0x11ED3F668",">",",","2",")"]
code: def __call__(self, target):
      return self.classes[target]
  
file_path: pytorch-meta/torchmeta/transforms/categorical.py
imports: import torch
  from torchmeta.transforms.utils import apply_wrapper
  from collections import defaultdict
  from torchmeta.transforms.target_transforms import TargetTransform
label_desc: Use image node_id 5 for calling the Categorical obj's underlying member method code with example usage: obj.__call__(target) and returns: self