code: def __init__(
      self,
      parent,
      batch_size=7,
      num_channels=3,
      min_resolution=30,
      max_resolution=400,
      do_resize=True,
      size=224,
      do_center_crop=True,
      crop_size=224,
      resample=None,
      do_normalize=True,
      image_mean=FLAVA_IMAGE_MEAN,
      image_std=FLAVA_IMAGE_STD,
      input_size_patches=14,
      total_mask_patches=75,
      mask_group_max_patches=None,
      mask_group_min_patches=16,
      mask_group_min_aspect_ratio=0.3,
      mask_group_max_aspect_ratio=None,
      codebook_do_resize=True,
      codebook_size=112,
      codebook_resample=None,
      codebook_do_center_crop=True,
      codebook_crop_size=112,
      codebook_do_map_pixels=True,
      codebook_do_normalize=True,
      codebook_image_mean=FLAVA_CODEBOOK_MEAN,
      codebook_image_std=FLAVA_CODEBOOK_STD,
  ):
      self.parent = parent
      self.batch_size = batch_size
      self.num_channels = num_channels
      self.do_resize = do_resize
      self.min_resolution = min_resolution
      self.max_resolution = max_resolution
      self.size = size
      self.resample = (
          resample
          if resample is not None
          else PILImageResampling.BICUBIC
      )
      self.do_normalize = do_normalize
      self.image_mean = image_mean
      self.image_std = image_std
      self.do_center_crop = do_center_crop
      self.crop_size = crop_size
  
      self.input_size_patches = input_size_patches
      self.total_mask_patches = total_mask_patches
      self.mask_group_max_patches = mask_group_max_patches
      self.mask_group_min_patches = mask_group_min_patches
      self.mask_group_min_aspect_ratio = mask_group_min_aspect_ratio
      self.mask_group_max_aspect_ratio = mask_group_max_aspect_ratio
  
      self.codebook_do_resize = codebook_do_resize
      self.codebook_size = codebook_size
      self.codebook_resample = (
          codebook_resample
          if codebook_resample is not None
          else PILImageResampling.LANCZOS
      )
      self.codebook_do_center_crop = codebook_do_center_crop
      self.codebook_crop_size = codebook_crop_size
      self.codebook_do_map_pixels = codebook_do_map_pixels
      self.codebook_do_normalize = codebook_do_normalize
      self.codebook_image_mean = codebook_image_mean
      self.codebook_image_std = codebook_image_std
  
imports: import random
  import unittest
  import numpy
  from transformers.testing_utils import require_torch, require_vision
  from transformers.utils import is_torch_available, is_vision_available
  from ...test_feature_extraction_common import FeatureExtractionSavingTestMixin, prepare_image_inputs
label_desc: Use image node_id 1 to create a new FlavaFeatureExtractionTester object from inherited base classes: unittest with example: obj = FlavaFeatureExtractionTester(parent, batch_size, num_channels, min_resolution, max_resolution, do_resize, size, do_center_crop, crop_size, resample, do_normalize, image_mean, image_std, input_size_patches, total_mask_patches, mask_group_max_patches, mask_group_min_patches, mask_group_min_aspect_ratio, mask_group_max_aspect_ratio, codebook_do_resize, codebook_size, codebook_resample, codebook_do_center_crop, codebook_crop_size, codebook_do_map_pixels, codebook_do_normalize, codebook_image_mean, codebook_image_std)