class_docstr: Prepare labels for multi-output support. That is when a single example has
  more than one label. Currently all that this transform does is one-hot encodes
  the labels. This is because the Classy accuracy meters already expects the labels
  to be one-hot encoded when in a multi-output mode.
docstr: Args:
      data (Union[List[Dict[str, List[List[int]]]], Dict[str, List[List[int]]]]). E.g:
          data = {"label": [[0]]}
code: def __call__(
      self,
      data: Union[
          List[Dict[str, List[List[int]]]], Dict[str, List[List[int]]]
      ],
  ):
      """
      Args:
          data (Union[List[Dict[str, List[List[int]]]], Dict[str, List[List[int]]]]). E.g:
              data = {"label": [[0]]}
      """
      # Handle case where data is a single example or an entire batch.
      data_list = data if isinstance(data, list) else [data]
  
      # One hot encode the labels.
      for sample in data_list:
          for idx, labels in enumerate(sample["label"]):
              sample["label"][idx] = self._one_hot_encode(
                  torch.tensor(labels)
              )
  
      return data
  
file_path: vissl/vissl/data/ssl_transforms/one_hot_encode.py
imports: from typing import Dict, List, Union
  import torch
  from classy_vision.dataset.transforms import register_transform
  from classy_vision.dataset.transforms.classy_transform import ClassyTransform
label_desc: Use image node_id 2 for calling the OneHotEncode obj's underlying member method code with example usage: obj.__call__(data) and returns: data