



import json
import os
from functools import lru_cache
from typing import List, Optional, Tuple

import regex as re

from ...tokenization_utils import AddedToken, PreTrainedTokenizer
from ...utils import logging


UpperCAmelCase					=				logging.get_logger(__name__)


UpperCAmelCase					=				{'vocab_file': 'vocab.json', 'merges_file': 'merges.txt'}

# See all MVP models at https://huggingface.co/models?filter=mvp
UpperCAmelCase					=				{
    'vocab_file': {
        'RUCAIBox/mvp': 'https://huggingface.co/RUCAIBox/mvp/resolve/main/vocab.json',
    },
    'added_tokens.json': {
        'RUCAIBox/mvp': 'https://huggingface.co/RUCAIBox/mvp/resolve/main/added_tokens.json',
    },
    'merges_file': {
        'RUCAIBox/mvp': 'https://huggingface.co/RUCAIBox/mvp/resolve/main/merges.txt',
    },
}

UpperCAmelCase					=				{
    'RUCAIBox/mvp': 10_24,
}


@lru_cache()
def SCREAMING_SNAKE_CASE				(     ):
       _UpperCamelCase     :       List[str]  						=  (
           list(range(ord('!'				)		,						ord('~'				) + 1				)				) + list(range(ord('¡'				)		,						ord('¬'				) + 1				)				) + list(range(ord('®'				)		,						ord('ÿ'				) + 1				)				)
       )
       _UpperCamelCase     :       List[str]  						=  bs[:]
       _UpperCamelCase     :       Union[str, Any]  						=  0
       for b in range(2**8				):
              if b not in bs:
                     bs.append(UpperCamelCase__				)
                     cs.append(2**8 + n				)
                     n += 1
       _UpperCamelCase     :       Dict  						=  [chr(UpperCamelCase__				) for n in cs]
       return dict(zip(UpperCamelCase__		,						UpperCamelCase__				)				)


def SCREAMING_SNAKE_CASE				(     lowercase_:	List[str]				):
       _UpperCamelCase     :       int  						=  set()
       _UpperCamelCase     :       Optional[int]  						=  word[0]
       for char in word[1:]:
              pairs.add((prev_char, char)				)
              _UpperCamelCase     :       Union[str, Any]  						=  char
       return pairs





class    __lowerCAmelCase  (       a_						):



 '''simple docstring'''
 _lowerCamelCase						:	Optional[Any]				    = VOCAB_FILES_NAMES
 _lowerCamelCase						:	List[str]				    = PRETRAINED_VOCAB_FILES_MAP
 _lowerCamelCase						:	int				    = PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
 _lowerCamelCase						:	Optional[int]				    = ['input_ids', 'attention_mask']

 def __init__(			self       :		Union[str, Any]       ,			lowerCamelCase       :		str       ,			lowerCamelCase       :		Any       ,			lowerCamelCase       :		Optional[Any]="replace"       ,			lowerCamelCase       :		List[Any]="<s>"       ,			lowerCamelCase       :		Optional[int]="</s>"       ,			lowerCamelCase       :		Tuple="</s>"       ,			lowerCamelCase       :		Union[str, Any]="<s>"       ,			lowerCamelCase       :		Tuple="<unk>"       ,			lowerCamelCase       :		Tuple="<pad>"       ,			lowerCamelCase       :		Optional[int]="<mask>"       ,			lowerCamelCase       :		Union[str, Any]=False       ,			**lowerCamelCase       :		Optional[Any]       ,			) ->							Dict:
        _UpperCamelCase     :       Any  						=  AddedToken(lowerCamelCase       ,			lstrip=lowerCamelCase       ,			rstrip=lowerCamelCase  ) if isinstance(lowerCamelCase       ,			lowerCamelCase  ) else bos_token
        _UpperCamelCase     :       str  						=  AddedToken(lowerCamelCase       ,			lstrip=lowerCamelCase       ,			rstrip=lowerCamelCase  ) if isinstance(lowerCamelCase       ,			lowerCamelCase  ) else eos_token
        _UpperCamelCase     :       str  						=  AddedToken(lowerCamelCase       ,			lstrip=lowerCamelCase       ,			rstrip=lowerCamelCase  ) if isinstance(lowerCamelCase       ,			lowerCamelCase  ) else sep_token
        _UpperCamelCase     :       Optional[int]  						=  AddedToken(lowerCamelCase       ,			lstrip=lowerCamelCase       ,			rstrip=lowerCamelCase  ) if isinstance(lowerCamelCase       ,			lowerCamelCase  ) else cls_token
        _UpperCamelCase     :       Optional[int]  						=  AddedToken(lowerCamelCase       ,			lstrip=lowerCamelCase       ,			rstrip=lowerCamelCase  ) if isinstance(lowerCamelCase       ,			lowerCamelCase  ) else unk_token
        _UpperCamelCase     :       Optional[int]  						=  AddedToken(lowerCamelCase       ,			lstrip=lowerCamelCase       ,			rstrip=lowerCamelCase  ) if isinstance(lowerCamelCase       ,			lowerCamelCase  ) else pad_token

        # Mask token behave like a normal word, i.e. include the space before it
        _UpperCamelCase     :       Optional[int]  						=  AddedToken(lowerCamelCase       ,			lstrip=lowerCamelCase       ,			rstrip=lowerCamelCase  ) if isinstance(lowerCamelCase       ,			lowerCamelCase  ) else mask_token

        super().__init__(
            errors=lowerCamelCase       ,			bos_token=lowerCamelCase       ,			eos_token=lowerCamelCase       ,			unk_token=lowerCamelCase       ,			sep_token=lowerCamelCase       ,			cls_token=lowerCamelCase       ,			pad_token=lowerCamelCase       ,			mask_token=lowerCamelCase       ,			add_prefix_space=lowerCamelCase       ,			**lowerCamelCase       ,			)
        with open(lowerCamelCase       ,			encoding='utf-8'  ) as vocab_handle:
               _UpperCamelCase     :       int  						=  json.load(lowerCamelCase  )
        _UpperCamelCase     :       Dict  						=  {v: k for k, v in self.encoder.items()}
        _UpperCamelCase     :       List[str]  						=  errors  # how to handle errors in decoding
        _UpperCamelCase     :       Any  						=  bytes_to_unicode()
        _UpperCamelCase     :       List[Any]  						=  {v: k for k, v in self.byte_encoder.items()}
        with open(lowerCamelCase       ,			encoding='utf-8'  ) as merges_handle:
               _UpperCamelCase     :       Tuple  						=  merges_handle.read().split('\n'  )[1:-1]
        _UpperCamelCase     :       List[str]  						=  [tuple(merge.split()  ) for merge in bpe_merges]
        _UpperCamelCase     :       Optional[Any]  						=  dict(zip(lowerCamelCase       ,			range(len(lowerCamelCase  )  )  )  )
        _UpperCamelCase     :       Tuple  						=  {}
        _UpperCamelCase     :       List[str]  						=  add_prefix_space

        # Should have added re.IGNORECASE so BPE merges can happen for capitalized versions of contractions
        _UpperCamelCase     :       Dict  						=  re.compile(r'\'s|\'t|\'re|\'ve|\'m|\'ll|\'d| ?\p{L}+| ?\p{N}+| ?[^\s\p{L}\p{N}]+|\s+(?!\S)|\s+'  )

 @property
 def 					__snake_case					(			self       :		Tuple  ) ->							str:
        return len(self.encoder  )

 def 					__snake_case					(			self       :		str  ) ->							int:
        return dict(self.encoder       ,			**self.added_tokens_encoder  )

 def 					__snake_case					(			self       :		Any       ,			lowerCamelCase       :		int  ) ->							List[str]:
        if token in self.cache:
               return self.cache[token]
        _UpperCamelCase     :       Optional[Any]  						=  tuple(lowerCamelCase  )
        _UpperCamelCase     :       Optional[int]  						=  get_pairs(lowerCamelCase  )

        if not pairs:
               return token

        while True:
               _UpperCamelCase     :       Dict  						=  min(lowerCamelCase       ,			key=lambda lowerCamelCase  : self.bpe_ranks.get(lowerCamelCase       ,			float('inf'  )  )  )
               if bigram not in self.bpe_ranks:
                      break
               _UpperCamelCase     :       Any  						=  bigram
               _UpperCamelCase     :       Tuple  						=  []
               _UpperCamelCase     :       Optional[Any]  						=  0
               while i < len(lowerCamelCase  ):
                      try:
                             _UpperCamelCase     :       int  						=  word.index(lowerCamelCase       ,			lowerCamelCase  )
                      except ValueError:
                             new_word.extend(word[i:]  )
                             break
                      else:
                             new_word.extend(word[i:j]  )
                             _UpperCamelCase     :       Union[str, Any]  						=  j

                      if word[i] == first and i < len(lowerCamelCase  ) - 1 and word[i + 1] == second:
                             new_word.append(first + second  )
                             i += 2
                      else:
                             new_word.append(word[i]  )
                             i += 1
               _UpperCamelCase     :       Tuple  						=  tuple(lowerCamelCase  )
               _UpperCamelCase     :       Dict  						=  new_word
               if len(lowerCamelCase  ) == 1:
                      break
               else:
                      _UpperCamelCase     :       Any  						=  get_pairs(lowerCamelCase  )
        _UpperCamelCase     :       List[Any]  						=  ''' '''.join(lowerCamelCase  )
        _UpperCamelCase     :       Optional[Any]  						=  word
        return word

 def 					__snake_case					(			self       :		Tuple       ,			lowerCamelCase       :		Any  ) ->							List[Any]:
        _UpperCamelCase     :       List[str]  						=  []
        for token in re.findall(self.pat       ,			lowerCamelCase  ):
               _UpperCamelCase     :       int  						=  ''''''.join(
                   self.byte_encoder[b] for b in token.encode('utf-8'  )  )  # Maps all our bytes to unicode strings, avoiding control tokens of the BPE (spaces in our case)
               bpe_tokens.extend(bpe_token for bpe_token in self.bpe(lowerCamelCase  ).split(' '  )  )
        return bpe_tokens

 def 					__snake_case					(			self       :		Tuple       ,			lowerCamelCase       :		Optional[int]  ) ->							Union[str, Any]:
        return self.encoder.get(lowerCamelCase       ,			self.encoder.get(self.unk_token  )  )

 def 					__snake_case					(			self       :		Union[str, Any]       ,			lowerCamelCase       :		str  ) ->							Tuple:
        return self.decoder.get(lowerCamelCase  )

 def 					__snake_case					(			self       :		Any       ,			lowerCamelCase       :		Optional[Any]  ) ->							str:
        _UpperCamelCase     :       Optional[int]  						=  ''''''.join(lowerCamelCase  )
        _UpperCamelCase     :       Union[str, Any]  						=  bytearray([self.byte_decoder[c] for c in text]  ).decode('utf-8'       ,			errors=self.errors  )
        return text

 def 					__snake_case					(			self       :		str       ,			lowerCamelCase       :		Any       ,			lowerCamelCase       :		int = None  ) ->							Tuple[str]:
        if not os.path.isdir(lowerCamelCase  ):
               logger.error(f"Vocabulary path ({save_directory}) should be a directory"  )
               return
        _UpperCamelCase     :       List[str]  						=  os.path.join(
            lowerCamelCase       ,			(filename_prefix + '-' if filename_prefix else '') + VOCAB_FILES_NAMES['vocab_file']  )
        _UpperCamelCase     :       Any  						=  os.path.join(
            lowerCamelCase       ,			(filename_prefix + '-' if filename_prefix else '') + VOCAB_FILES_NAMES['merges_file']  )

        with open(lowerCamelCase       ,			'w'       ,			encoding='utf-8'  ) as f:
               f.write(json.dumps(self.encoder       ,			indent=2       ,			sort_keys=lowerCamelCase       ,			ensure_ascii=lowerCamelCase  ) + '\n'  )

        _UpperCamelCase     :       Optional[Any]  						=  0
        with open(lowerCamelCase       ,			'w'       ,			encoding='utf-8'  ) as writer:
               writer.write('#version: 0.2\n'  )
               for bpe_tokens, token_index in sorted(self.bpe_ranks.items()       ,			key=lambda lowerCamelCase  : kv[1]  ):
                      if index != token_index:
                             logger.warning(
                                 f"Saving vocabulary to {merge_file}: BPE merge indices are not consecutive."
                                 ' Please check that the tokenizer is not corrupted!'  )
                             _UpperCamelCase     :       List[Any]  						=  token_index
                      writer.write(' '.join(lowerCamelCase  ) + '\n'  )
                      index += 1

        return vocab_file, merge_file

 def 					__snake_case					(			self       :		Optional[Any]       ,			lowerCamelCase       :		str       ,			lowerCamelCase       :		Optional[Any] = None  ) ->							List[int]:
        if token_ids_a is None:
               return [self.cls_token_id] + token_ids_a + [self.sep_token_id]
        _UpperCamelCase     :       Optional[int]  						=  [self.cls_token_id]
        _UpperCamelCase     :       Dict  						=  [self.sep_token_id]
        return cls + token_ids_a + sep + sep + token_ids_a + sep

 def 					__snake_case					(			self       :		Optional[Any]       ,			lowerCamelCase       :		List[str]       ,			lowerCamelCase       :		List[Any] = None       ,			lowerCamelCase       :		List[Any] = False  ) ->							List[int]:
        if already_has_special_tokens:
               return super().get_special_tokens_mask(
                   token_ids_a=lowerCamelCase       ,			token_ids_a=lowerCamelCase       ,			already_has_special_tokens=lowerCamelCase  )

        if token_ids_a is None:
               return [1] + ([0] * len(lowerCamelCase  )) + [1]
        return [1] + ([0] * len(lowerCamelCase  )) + [1, 1] + ([0] * len(lowerCamelCase  )) + [1]

 def 					__snake_case					(			self       :		List[Any]       ,			lowerCamelCase       :		Tuple       ,			lowerCamelCase       :		Union[str, Any] = None  ) ->							List[int]:
        _UpperCamelCase     :       str  						=  [self.sep_token_id]
        _UpperCamelCase     :       Union[str, Any]  						=  [self.cls_token_id]

        if token_ids_a is None:
               return len(cls + token_ids_a + sep  ) * [0]
        return len(cls + token_ids_a + sep + sep + token_ids_a + sep  ) * [0]

 def 					__snake_case					(			self       :		List[str]       ,			lowerCamelCase       :		Dict       ,			lowerCamelCase       :		Optional[int]=False       ,			**lowerCamelCase       :		List[Any]  ) ->							Dict:
        _UpperCamelCase     :       str  						=  kwargs.pop('add_prefix_space'       ,			self.add_prefix_space  )
        if (is_split_into_words or add_prefix_space) and (len(lowerCamelCase  ) > 0 and not text[0].isspace()):
               _UpperCamelCase     :       Tuple  						=  ''' ''' + text
        return (text, kwargs)




import unittest

import numpy as np

from transformers.testing_utils import require_torch, require_vision
from transformers.utils import is_torch_available, is_vision_available

from ...test_image_processing_common import ImageProcessingSavingTestMixin


if is_torch_available():
 import torch

if is_vision_available():
 from PIL import Image

 from transformers import TvltImageProcessor


def SCREAMING_SNAKE_CASE				(     lowercase_:	Tuple		,						lowercase_:	Optional[int]=10		,						lowercase_:	Optional[Any]=10		,						lowercase_:	Optional[Any]=False		,						lowercase_:	Any=False				):
       _UpperCamelCase     :       List[Any]  						=  []
       for i in range(image_processor_tester.num_frames				):
              video.append(np.random.randint(255		,						size=(image_processor_tester.num_channels, width, height)		,						dtype=np.uinta				)				)

       if not numpify and not torchify:
              # PIL expects the channel dimension as last dimension
              _UpperCamelCase     :       Tuple  						=  [Image.fromarray(np.moveaxis(lowercase_		,						0		,						-1				)				) for frame in video]

       if torchify:
              _UpperCamelCase     :       Union[str, Any]  						=  [torch.from_numpy(lowercase_				) for frame in video]

       return video


def SCREAMING_SNAKE_CASE				(     lowercase_:	List[str]		,						lowercase_:	Optional[Any]=False		,						lowercase_:	Tuple=False		,						lowercase_:	Union[str, Any]=False				):
       assert not (numpify and torchify), "You cannot specify both numpy and PyTorch tensors at the same time"

       _UpperCamelCase     :       Any  						=  []
       for i in range(image_processor_tester.batch_size				):
              if equal_resolution:
                     _UpperCamelCase     :       str  						=  image_processor_tester.max_resolution
              else:
                     _UpperCamelCase						,      _UpperCamelCase     :       int  						=  np.random.choice(
                         np.arange(image_processor_tester.min_resolution		,						image_processor_tester.max_resolution				)		,						2				)
                     _UpperCamelCase     :       Optional[Any]  						=  prepare_video(
                         image_processor_tester=lowercase_		,						width=lowercase_		,						height=lowercase_		,						numpify=lowercase_		,						torchify=lowercase_		,						)
              video_inputs.append(lowercase_				)

       return video_inputs




class    __lowerCAmelCase  (       unittest.TestCase						):



 '''simple docstring'''

 def __init__(			self       :		Optional[Any]       ,			lowerCamelCase       :		Union[str, Any]       ,			lowerCamelCase       :		Optional[int]=7       ,			lowerCamelCase       :		List[Any]=3       ,			lowerCamelCase       :		str=4       ,			lowerCamelCase       :		Union[str, Any]=1_8       ,			lowerCamelCase       :		str=3_0       ,			lowerCamelCase       :		List[str]=4_0_0       ,			lowerCamelCase       :		Tuple=True       ,			lowerCamelCase       :		Union[str, Any]=None       ,			lowerCamelCase       :		List[str]=True       ,			lowerCamelCase       :		Optional[Any]=[0.5, 0.5, 0.5]       ,			lowerCamelCase       :		Any=[0.5, 0.5, 0.5]       ,			lowerCamelCase       :		str=True       ,			lowerCamelCase       :		Optional[Any]=None       ,			) ->							Union[str, Any]:
        _UpperCamelCase     :       Optional[int]  						=  size if size is not None else {'shortest_edge': 1_8}
        _UpperCamelCase     :       Dict  						=  crop_size if crop_size is not None else {'height': 1_8, 'width': 1_8}

        _UpperCamelCase     :       Any  						=  parent
        _UpperCamelCase     :       Optional[Any]  						=  batch_size
        _UpperCamelCase     :       List[Any]  						=  num_channels
        _UpperCamelCase     :       List[Any]  						=  num_frames
        _UpperCamelCase     :       Union[str, Any]  						=  image_size
        _UpperCamelCase     :       Dict  						=  min_resolution
        _UpperCamelCase     :       int  						=  max_resolution
        _UpperCamelCase     :       Union[str, Any]  						=  do_resize
        _UpperCamelCase     :       str  						=  size
        _UpperCamelCase     :       Dict  						=  do_normalize
        _UpperCamelCase     :       Union[str, Any]  						=  image_mean
        _UpperCamelCase     :       Optional[int]  						=  image_std
        _UpperCamelCase     :       Tuple  						=  do_center_crop
        _UpperCamelCase     :       Any  						=  crop_size

 def 					__snake_case					(			self       :		Tuple  ) ->							Optional[Any]:
        return {
            "image_mean": self.image_mean,
            "image_std": self.image_std,
            "do_normalize": self.do_normalize,
            "do_resize": self.do_resize,
            "size": self.size,
            "do_center_crop": self.do_center_crop,
            "crop_size": self.crop_size,
        }







@require_torch
@require_vision
class    __lowerCAmelCase  (       a_,	unittest.TestCase						):



 '''simple docstring'''
 _lowerCamelCase						:	Any				    = TvltImageProcessor if is_vision_available() else None

 def 					__snake_case					(			self       :		int  ) ->							Optional[int]:
        _UpperCamelCase     :       Optional[Any]  						=  TvltImageProcessorTester(self  )

 @property
 def 					__snake_case					(			self       :		Optional[Any]  ) ->							Any:
        return self.image_processor_tester.prepare_image_processor_dict()

 def 					__snake_case					(			self       :		Union[str, Any]  ) ->							str:
        _UpperCamelCase     :       Tuple  						=  self.image_processing_class(**self.image_processor_dict  )
        self.assertTrue(hasattr(lowerCamelCase       ,			'image_mean'  )  )
        self.assertTrue(hasattr(lowerCamelCase       ,			'image_std'  )  )
        self.assertTrue(hasattr(lowerCamelCase       ,			'do_normalize'  )  )
        self.assertTrue(hasattr(lowerCamelCase       ,			'do_resize'  )  )
        self.assertTrue(hasattr(lowerCamelCase       ,			'do_center_crop'  )  )
        self.assertTrue(hasattr(lowerCamelCase       ,			'size'  )  )

 def 					__snake_case					(			self       :		Dict  ) ->							Optional[int]:
        # Initialize image_processor
        _UpperCamelCase     :       str  						=  self.image_processing_class(**self.image_processor_dict  )
        # create random PIL videos
        _UpperCamelCase     :       int  						=  prepare_video_inputs(self.image_processor_tester       ,			equal_resolution=lowerCamelCase  )
        for video in video_inputs:
               self.assertIsInstance(lowerCamelCase       ,			lowerCamelCase  )
               self.assertIsInstance(video[0]       ,			Image.Image  )

        # Test not batched input
        _UpperCamelCase     :       Dict  						=  image_processor(video_inputs[0]       ,			return_tensors='pt'  ).pixel_values
        self.assertEqual(
            encoded_videos.shape       ,			(
                1,
                self.image_processor_tester.num_frames,
                self.image_processor_tester.num_channels,
                self.image_processor_tester.crop_size['height'],
                self.image_processor_tester.crop_size['width'],
            )       ,			)

        # Test batched
        _UpperCamelCase     :       Any  						=  image_processor(lowerCamelCase       ,			return_tensors='pt'  ).pixel_values
        self.assertEqual(
            encoded_videos.shape       ,			(
                self.image_processor_tester.batch_size,
                self.image_processor_tester.num_frames,
                self.image_processor_tester.num_channels,
                self.image_processor_tester.crop_size['height'],
                self.image_processor_tester.crop_size['width'],
            )       ,			)

 def 					__snake_case					(			self       :		Union[str, Any]  ) ->							List[str]:
        # Initialize image_processor
        _UpperCamelCase     :       Optional[int]  						=  self.image_processing_class(**self.image_processor_dict  )
        # create random numpy tensors
        _UpperCamelCase     :       int  						=  prepare_video_inputs(self.image_processor_tester       ,			equal_resolution=lowerCamelCase       ,			numpify=lowerCamelCase  )
        for video in video_inputs:
               self.assertIsInstance(lowerCamelCase       ,			lowerCamelCase  )
               self.assertIsInstance(video[0]       ,			np.ndarray  )

        # Test not batched input
        _UpperCamelCase     :       Optional[int]  						=  image_processor(video_inputs[0]       ,			return_tensors='pt'  ).pixel_values
        self.assertEqual(
            encoded_videos.shape       ,			(
                1,
                self.image_processor_tester.num_frames,
                self.image_processor_tester.num_channels,
                self.image_processor_tester.crop_size['height'],
                self.image_processor_tester.crop_size['width'],
            )       ,			)

        # Test batched
        _UpperCamelCase     :       int  						=  image_processor(lowerCamelCase       ,			return_tensors='pt'  ).pixel_values
        self.assertEqual(
            encoded_videos.shape       ,			(
                self.image_processor_tester.batch_size,
                self.image_processor_tester.num_frames,
                self.image_processor_tester.num_channels,
                self.image_processor_tester.crop_size['height'],
                self.image_processor_tester.crop_size['width'],
            )       ,			)

 def 					__snake_case					(			self       :		Optional[Any]  ) ->							Any:
        # Initialize image_processor
        _UpperCamelCase     :       int  						=  self.image_processing_class(**self.image_processor_dict  )
        # create random PyTorch tensors
        _UpperCamelCase     :       Optional[Any]  						=  prepare_video_inputs(self.image_processor_tester       ,			equal_resolution=lowerCamelCase       ,			torchify=lowerCamelCase  )
        for video in video_inputs:
               self.assertIsInstance(lowerCamelCase       ,			lowerCamelCase  )
               self.assertIsInstance(video[0]       ,			torch.Tensor  )

        # Test not batched input
        _UpperCamelCase     :       Dict  						=  image_processor(video_inputs[0]       ,			return_tensors='pt'  ).pixel_values
        self.assertEqual(
            encoded_videos.shape       ,			(
                1,
                self.image_processor_tester.num_frames,
                self.image_processor_tester.num_channels,
                self.image_processor_tester.crop_size['height'],
                self.image_processor_tester.crop_size['width'],
            )       ,			)

        # Test batched
        _UpperCamelCase     :       Optional[int]  						=  image_processor(lowerCamelCase       ,			return_tensors='pt'  ).pixel_values
        self.assertEqual(
            encoded_videos.shape       ,			(
                self.image_processor_tester.batch_size,
                self.image_processor_tester.num_frames,
                self.image_processor_tester.num_channels,
                self.image_processor_tester.crop_size['height'],
                self.image_processor_tester.crop_size['width'],
            )       ,			)



