class_docstr: Convert a PIL image to RGB mode.
  
  This transform is necessary to adapt datasets such as MNIST (which has 1 color channel)
  as input to traditional architectures (like ResNet50) requiring 3 color channels.
  
  We first create an image of the same size as the original (or fixed "size" if provided as input) and
  paste the original image in it. If a different size is provided, the "box" indicates where the paste
  of the original image will be in the target image.
  
  Default behavior (no arguments provided) is to keep the original image size.
  
  The output is a PIL image in RGB mode.
code: def __init__(self, size: Union[int, List[int]], box: List[int]):
      super().__init__()
      if isinstance(size, int):
          size = [size, size]
      if size:
          assert (
              len(size) == 2
          ), f'ImgPil2RGB: Expected "size" parameter of length 2, got: {size}'
      assert (
          len(box) == 2
      ), f'ImgPil2RGB: Expected "box" parameter of length 2, got: {box}'
      self.size = size
      self.box = box
  
file_path: vissl/vissl/data/ssl_transforms/mnist_img_pil_to_rgb_mode.py
imports: from typing import Any, Dict, List, Union
  from classy_vision.dataset.transforms import register_transform
  from classy_vision.dataset.transforms.classy_transform import ClassyTransform
  from PIL import Image
label_desc: Use image node_id 1 to create a new MNISTImgPil2RGB object from inherited base classes: ClassyTransform with example: obj = MNISTImgPil2RGB(size, box)