class_docstr: Crop the given PIL Image to random size and aspect ratio with random interpolation.
  
  A crop of random size (default: of 0.08 to 1.0) of the original size and a random
  aspect ratio (default: of 3/4 to 4/3) of the original aspect ratio is made. This crop
  is finally resized to given size.
  This is popularly used to train the Inception networks.
  
  Args:
      size: expected output size of each edge
      scale: range of size of the origin size cropped
      ratio: range of aspect ratio of the origin aspect ratio cropped
      interpolation: Default: PIL.Image.BILINEAR
class_docstr_tok: ["Crop","the","given","PIL","Image","to","random","size","and","aspect","ratio","with","random","interpolation",".","A","crop","of","random","size","(","default",":","of","0.08","to","1.0",")","of","the","original","size","and","a","random","aspect","ratio","(","default",":","of","3\/4","to","4\/3",")","of","the","original","aspect","ratio","is","made",".","This","crop","is","finally","resized","to","given","size",".","This","is","popularly","used","to","train","the","Inception","networks",".","Args",":","size",":","expected","output","size","of","each","edge","scale",":","range","of","size","of","the","origin","size","cropped","ratio",":","range","of","aspect","ratio","of","the","origin","aspect","ratio","cropped","interpolation",":","Default",":","PIL.Image.BILINEAR"]
code: def __init__(
      self,
      size,
      second_size=None,
      scale=(0.08, 1.0),
      ratio=(3.0 / 4.0, 4.0 / 3.0),
      interpolation="bilinear",
      second_interpolation="lanczos",
  ):
      if isinstance(size, tuple):
          self.size = size
      else:
          self.size = (size, size)
      if second_size is not None:
          if isinstance(second_size, tuple):
              self.second_size = second_size
          else:
              self.second_size = (second_size, second_size)
      else:
          self.second_size = None
      if (scale[0] > scale[1]) or (ratio[0] > ratio[1]):
          logger.warning("range should be of kind (min, max)")
  
      if interpolation == "random":
          from PIL import Image
  
          self.interpolation = (Image.BILINEAR, Image.BICUBIC)
      else:
          self.interpolation = self._pil_interp(interpolation)
  
      self.second_interpolation = (
          self._pil_interp(second_interpolation)
          if second_interpolation is not None
          else None
      )
      self.scale = scale
      self.ratio = ratio
  
imports: from functools import partial
  import logging
  import math
  import random
  import time
  import numpy
  import os
  import torch
  from torchvision import datasets, transforms
  from .path_dataset import PathDataset
  from fairseq.data import FairseqDataset
  from fairseq.data.data_utils import compute_block_mask_1d, compute_block_mask_2d
  from shutil import copyfile
label_desc: Use image node_id 1 to create a new RandomResizedCropAndInterpolationWithTwoPic object  with example: obj = RandomResizedCropAndInterpolationWithTwoPic(size, second_size, scale, ratio, interpolation, second_interpolation)