
'''simple docstring'''
import logging
from pathlib import Path
from typing import Any, List, Tuple

import yaml


# loading package files: https://stackoverflow.com/a/20885799
try:
						import importlib.resources as pkg_resources
except ImportError:
						# Try backported to PY<37 `importlib_resources`.
						import importlib_resources as pkg_resources

from . import resources


lowercase__		    =	"https://github.com/huggingface/datasets/tree/main/src/datasets/utils"
lowercase__		    =	f"{BASE_REF_URL}/{__file__}"
lowercase__		    =	logging.getLogger(__name__)




def 					_UpperCamelCase		(    SCREAMING_SNAKE_CASE__       )   ->				Tuple[Any, str]:


		'''simple docstring'''


		snake_case   :    Dict			       =		pkg_resources.read_text(SCREAMING_SNAKE_CASE__      ,    SCREAMING_SNAKE_CASE__       )
		return yaml.safe_load(SCREAMING_SNAKE_CASE__       ), F'{BASE_REF_URL}/resources/{resource}'


lowercase__    ,   lowercase__		    =	load_yaml_resource("readme_structure.yaml")

lowercase__		    =	[
    "[Needs More Information]",
    "[More Information Needed]",
    "(https://github.com/huggingface/datasets/blob/main/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)",
]

# Dictionary representation of section/readme, error_list, warning_list
lowercase__		    =	Tuple[dict, List[str], List[str]]






class      snake_case__    :







		"""simple docstring"""

		def __init__(	self							:       Optional[int]   ,     UpperCamelCase__							:       str   ,     UpperCamelCase__							:       str   ,     UpperCamelCase__							:       List[str] = None   ,     UpperCamelCase__							:       bool = False	)		->       int:






				"""simple docstring"""







				snake_case   :    Union[str, Any]			       =		name
				snake_case   :    List[Any]			       =		level
				snake_case   :    List[str]			       =		lines
				snake_case   :    Dict			       =		''''''
				snake_case   :    Dict			       =		True
				snake_case   :    Dict			       =		{}
				snake_case   :    Union[str, Any]			       =		[]
				snake_case   :    Optional[int]			       =		[]
				if self.lines is not None:
						self.parse(suppress_parsing_errors=UpperCamelCase__	)



		def 	lowerCAmelCase							(	self							:       Tuple   ,     UpperCamelCase__							:       bool = False	)		->       Union[str, Any]:






				"""simple docstring"""







				snake_case   :    List[Any]			       =		''''''
				snake_case   :    List[Any]			       =		[]
				snake_case   :    Optional[int]			       =		False
				for line in self.lines:
						if line.strip(''' \n'''	) == "":
								continue
						elif line.strip(''' \n'''	)[:3] == "```":
								snake_case   :    str			       =		not code_start
						elif line.split()[0] == self.level + "#" and not code_start:
								if current_sub_level != "":
										snake_case   :    Optional[Any]			       =		Section(UpperCamelCase__   ,     self.level + '''#'''   ,     UpperCamelCase__	)
										snake_case   :    str			       =		[]
								else:
										if current_lines != []:
												self.text += "".join(UpperCamelCase__	).strip()
												if self.text != "" and self.text not in FILLER_TEXT:
														snake_case   :    Tuple			       =		False
												snake_case   :    Any			       =		[]

								snake_case   :    Dict			       =		''' '''.join(line.split()[1:]	).strip(''' \n'''	)
						else:
								current_lines.append(UpperCamelCase__	)
				else:
						if current_sub_level != "":
								if current_sub_level in self.content:
										self.parsing_error_list.append(
										    f'Multiple sections with the same heading `{current_sub_level}` have been found. Please keep only one of these sections.'	)
								snake_case   :    Tuple			       =		Section(UpperCamelCase__   ,     self.level + '''#'''   ,     UpperCamelCase__	)
						else:
								if current_lines != []:
										self.text += "".join(UpperCamelCase__	).strip()
										if self.text != "" and self.text not in FILLER_TEXT:
												snake_case   :    List[str]			       =		False

				if self.level == "" and not suppress_parsing_errors:
						if self.parsing_error_list != [] or self.parsing_warning_list != []:
								snake_case   :    Optional[Any]			       =		'''\n'''.join('''-\t''' + x for x in self.parsing_error_list + self.parsing_warning_list	)
								snake_case   :    str			       =		f'The following issues were found while parsing the README at `{self.name}`:\n' + errors
								raise ValueError(UpperCamelCase__	)



		def 	lowerCAmelCase							(	self							:       Optional[int]   ,     UpperCamelCase__							:       dict	)		->       ReadmeValidatorOutput:






				"""simple docstring"""







				snake_case   :    List[Any]			       =		[]
				snake_case   :    Tuple			       =		[]
				if structure["allow_empty"] is False:
						# If content is expected
						if self.is_empty_text and self.content == {}:
								# If no content is found, mention it in the error_list
								error_list.append(f'Expected some content in section `{self.name}` but it is empty.'	)

				if structure["allow_empty_text"] is False:
						# If some text is expected
						if self.is_empty_text:
								# If no text is found, mention it in the error_list
								error_list.append(
								    f'Expected some text in section `{self.name}` but it is empty (text in subsections are ignored).'	)
        # Subsections Validation
				if structure["subsections"] is not None:
						# If subsections are expected
						if self.content == {}:
								# If no subsections are present
								snake_case   :    List[Any]			       =		[subsection['''name'''] for subsection in structure['''subsections''']]
								# Mention the expected values in the error_list
								error_list.append(
								    f'Section `{self.name}` expected the following subsections: {", ".join(["`"+x+"`" for x in values]	)}. Found \'None\'.'	)
						else:
								# If some subsections are present
								snake_case   :    Any			       =		[subsection['''name'''] for subsection in structure['''subsections''']]
								snake_case   :    Tuple			       =		False
								for idx, name in enumerate(UpperCamelCase__	):
										if name not in self.content:
												# If the expected subsection is not present
												error_list.append(f'Section `{self.name}` is missing subsection: `{name}`.'	)
												snake_case   :    int			       =		True
										else:
												# If the subsection is present, validate subsection, return the result
												# and concat the errors from subsection to section error_list

												# Skip sublevel validation if current level is `###`
												if self.level == "###":
														continue
												else:
														snake_case       ,snake_case       ,snake_case   :    Optional[int]			       =		self.content[name].validate(
														    structure['''subsections'''][idx]	)
												error_list += subsec_error_list
												warning_list += subsec_warning_list

								if has_missing_subsections:  # we only allow to have extra subsections if all the other ones are here
										for name in self.content:
												if name not in structure_names:
														# If an extra subsection is present
														warning_list.append(
														    f'`{self.name}` has an extra subsection: `{name}`. Skipping further validation checks for this subsection as expected structure is unknown.'	)
				if error_list:
						# If there are errors, do not return the dictionary as it is invalid
						return {}, error_list, warning_list
				else:
						return self.to_dict(), error_list, warning_list



		def 	lowerCAmelCase							(	self							:       List[Any]	)		->       dict:






				"""simple docstring"""







				return {
				    "name": self.name,
				    "text": self.text,
				    "is_empty_text": self.is_empty_text,
				    "subsections": [value.to_dict() for value in self.content.values()],
				}







class      snake_case__    (	__SCREAMING_SNAKE_CASE ):  # Level 0







		"""simple docstring"""

		def __init__(	self							:       Union[str, Any]   ,     UpperCamelCase__							:       str   ,     UpperCamelCase__							:       List[str]   ,     UpperCamelCase__							:       dict = None   ,     UpperCamelCase__							:       bool = False	)		->       Optional[Any]:






				"""simple docstring"""







				super().__init__(name=UpperCamelCase__   ,     level=''''''	)  # Not using lines here as we need to use a child class parse
				snake_case   :    str			       =		structure
				snake_case   :    Tuple			       =		-2
				snake_case   :    List[Any]			       =		0
				snake_case   :    int			       =		lines
				if self.lines is not None:
						self.parse(suppress_parsing_errors=UpperCamelCase__	)



		def 	lowerCAmelCase							(	self							:       Any	)		->       int:






				"""simple docstring"""







				if self.structure is None:
						snake_case       ,snake_case       ,snake_case   :    Any			       =		self._validate(UpperCamelCase__	)
				else:
						snake_case       ,snake_case       ,snake_case   :    List[Any]			       =		self._validate(self.structure	)
				if error_list != [] or warning_list != []:
						snake_case   :    List[str]			       =		'''\n'''.join(['''-\t''' + x for x in error_list + warning_list]	)
						snake_case   :    Optional[Any]			       =		f'The following issues were found for the README at `{self.name}`:\n' + errors
						raise ValueError(UpperCamelCase__	)



		@classmethod
		def 	lowerCAmelCase							(	cls							:       int   ,     UpperCamelCase__							:       Path   ,     UpperCamelCase__							:       dict = None   ,     UpperCamelCase__							:       bool = False	)		->       Tuple:






				"""simple docstring"""







				with open(UpperCamelCase__   ,     encoding='''utf-8'''	) as f:
						snake_case   :    Optional[int]			       =		f.readlines()
				return cls(UpperCamelCase__   ,     UpperCamelCase__   ,     UpperCamelCase__   ,     suppress_parsing_errors=UpperCamelCase__	)



		@classmethod
		def 	lowerCAmelCase							(	cls							:       List[str]   ,     UpperCamelCase__							:       str   ,     UpperCamelCase__							:       dict = None   ,     UpperCamelCase__							:       str = "root"   ,     UpperCamelCase__							:       bool = False	)		->       Any:






				"""simple docstring"""







				snake_case   :    List[Any]			       =		string.split('''\n'''	)
				return cls(UpperCamelCase__   ,     UpperCamelCase__   ,     UpperCamelCase__   ,     suppress_parsing_errors=UpperCamelCase__	)



		def 	lowerCAmelCase							(	self							:       Tuple   ,     UpperCamelCase__							:       bool = False	)		->       Optional[int]:






				"""simple docstring"""







				snake_case   :    Union[str, Any]			       =		0

				for line in self.lines:
						self.yaml_tags_line_count += 1
						if line.strip(''' \n'''	) == "---":
								self.tag_count += 1
								if self.tag_count == 2:
										break
						line_count += 1
				if self.tag_count == 2:
						snake_case   :    str			       =		self.lines[line_count + 1 :]  # Get the last + 1 th item.
				else:
						snake_case   :    List[Any]			       =		self.lines[self.tag_count :]
				super().parse(suppress_parsing_errors=UpperCamelCase__	)



		def __str__(	self							:       Optional[int]	)		->       str:






				"""simple docstring"""







				return str(self.to_dict()	)



		def 	lowerCAmelCase							(	self							:       Any   ,     UpperCamelCase__							:       Optional[Any]	)		->       List[Any]:






				"""simple docstring"""







				snake_case   :    Union[str, Any]			       =		[]
				snake_case   :    int			       =		[]
				if self.yaml_tags_line_count == 0:
						warning_list.append('''Empty YAML markers are present in the README.'''	)
				elif self.tag_count == 0:
						warning_list.append('''No YAML markers are present in the README.'''	)
				elif self.tag_count == 1:
						warning_list.append('''Only the start of YAML tags present in the README.'''	)
				# Check how many first level sections are present.
				snake_case   :    Optional[Any]			       =		len(self.content.keys()	)
				if num_first_level_keys > 1:
						# If more than one, add to the error list, continue
						error_list.append(
						    f'The README has several first-level headings: {", ".join(["`"+x+"`" for x in list(self.content.keys()	)]	)}. Only one heading is expected. Skipping further validation for this README.'	)
				elif num_first_level_keys < 1:
						# If less than one, append error.
						error_list.append(
						    '''The README has no first-level headings. One heading is expected. Skipping further validation for this README.'''	)

				else:
						# If one exactly
						snake_case   :    int			       =		list(self.content.keys()	)[0]  # Get the key
						if start_key.startswith('''Dataset Card for'''	):  # Check correct start
								# If the starting is correct, validate all the sections
								snake_case       ,snake_case       ,snake_case   :    Any			       =		self.content[start_key].validate(
								    readme_structure['''subsections'''][0]	)
								error_list += sec_error_list
								warning_list += sec_warning_list
						else:
								# If not found, append error
								error_list.append(
								    '''No first-level heading starting with `Dataset Card for` found in README. Skipping further validation for this README.'''	)
				if error_list:
						# If there are errors, do not return the dictionary as it is invalid
						return {}, error_list, warning_list
				else:
						return self.to_dict(), error_list, warning_list


if __name__ == "__main__":
						from argparse import ArgumentParser

						lowercase__		    =	ArgumentParser(usage="Validate the content (excluding YAML tags) of a README.md file.")
						ap.add_argument("readme_filepath")
						lowercase__		    =	ap.parse_args()
						lowercase__		    =	Path(args.readme_filepath)
						lowercase__		    =	ReadMe.from_readme(readme_filepath)




'''simple docstring'''
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 BlipImageProcessor






class      snake_case__    (	unittest.TestCase ):







		"""simple docstring"""

		def __init__(	self							:       List[str]   ,     UpperCamelCase__							:       Union[str, Any]   ,     UpperCamelCase__							:       Optional[Any]=7   ,     UpperCamelCase__							:       Union[str, Any]=3   ,     UpperCamelCase__							:       Tuple=18   ,     UpperCamelCase__							:       Union[str, Any]=30   ,     UpperCamelCase__							:       Dict=400   ,     UpperCamelCase__							:       Tuple=True   ,     UpperCamelCase__							:       Optional[Any]=None   ,     UpperCamelCase__							:       Any=True   ,     UpperCamelCase__							:       Dict=False   ,     UpperCamelCase__							:       Dict=[0.48_145_466, 0.4_578_275, 0.40_821_073]   ,     UpperCamelCase__							:       int=[0.26_862_954, 0.26_130_258, 0.27_577_711]   ,     UpperCamelCase__							:       str=True   ,     )		->       Any:






				"""simple docstring"""







				snake_case   :    Dict			       =		size if size is not None else {'''height''': 20, '''width''': 20}
				snake_case   :    Union[str, Any]			       =		parent
				snake_case   :    Optional[int]			       =		batch_size
				snake_case   :    Dict			       =		num_channels
				snake_case   :    List[Any]			       =		image_size
				snake_case   :    List[Any]			       =		min_resolution
				snake_case   :    Dict			       =		max_resolution
				snake_case   :    Dict			       =		do_resize
				snake_case   :    Optional[int]			       =		size
				snake_case   :    Dict			       =		do_normalize
				snake_case   :    Tuple			       =		image_mean
				snake_case   :    Optional[int]			       =		image_std
				snake_case   :    int			       =		do_pad
				snake_case   :    List[Any]			       =		do_convert_rgb



		def 	lowerCAmelCase							(	self							:       str	)		->       Optional[int]:






				"""simple docstring"""







				return {
				    "do_resize": self.do_resize,
				    "size": self.size,
				    "do_normalize": self.do_normalize,
				    "image_mean": self.image_mean,
				    "image_std": self.image_std,
				    "do_convert_rgb": self.do_convert_rgb,
				    "do_pad": self.do_pad,
				}



		def 	lowerCAmelCase							(	self							:       str   ,     UpperCamelCase__							:       Optional[int]=False   ,     UpperCamelCase__							:       Tuple=False   ,     UpperCamelCase__							:       Union[str, Any]=False	)		->       List[str]:






				"""simple docstring"""







				assert not (numpify and torchify), "You cannot specify both numpy and PyTorch tensors at the same time"

				if equal_resolution:
						snake_case   :    Any			       =		[]
						for i in range(self.batch_size	):
								image_inputs.append(
								    np.random.randint(
								        255   ,     size=(self.num_channels, self.max_resolution, self.max_resolution)   ,     dtype=np.uinta	)	)
				else:
						snake_case   :    Union[str, Any]			       =		[]
						for i in range(self.batch_size	):
								snake_case       ,snake_case   :    List[Any]			       =		np.random.choice(np.arange(self.min_resolution   ,     self.max_resolution	)   ,     2	)
								image_inputs.append(np.random.randint(255   ,     size=(self.num_channels, width, height)   ,     dtype=np.uinta	)	)

				if not numpify and not torchify:
						# PIL expects the channel dimension as last dimension
						snake_case   :    Optional[int]			       =		[Image.fromarray(np.moveaxis(UpperCamelCase__   ,     0   ,     -1	)	) for x in image_inputs]

				if torchify:
						snake_case   :    Optional[Any]			       =		[torch.from_numpy(UpperCamelCase__	) for x in image_inputs]

				return image_inputs







@require_torch
@require_vision
class      snake_case__    (	__SCREAMING_SNAKE_CASE  , unittest.TestCase ):







		"""simple docstring"""

		lowerCamelCase							=		BlipImageProcessor if is_vision_available() else None



		def 	lowerCAmelCase							(	self							:       Dict	)		->       Optional[int]:






				"""simple docstring"""







				snake_case   :    Union[str, Any]			       =		BlipImageProcessingTester(self	)



		@property
		def 	lowerCAmelCase							(	self							:       Any	)		->       Union[str, Any]:






				"""simple docstring"""







				return self.image_processor_tester.prepare_image_processor_dict()



		def 	lowerCAmelCase							(	self							:       Optional[Any]	)		->       Any:






				"""simple docstring"""







				snake_case   :    Dict			       =		self.image_processing_class(**self.image_processor_dict	)
				self.assertTrue(hasattr(UpperCamelCase__   ,     '''do_resize'''	)	)
				self.assertTrue(hasattr(UpperCamelCase__   ,     '''size'''	)	)
				self.assertTrue(hasattr(UpperCamelCase__   ,     '''do_normalize'''	)	)
				self.assertTrue(hasattr(UpperCamelCase__   ,     '''image_mean'''	)	)
				self.assertTrue(hasattr(UpperCamelCase__   ,     '''image_std'''	)	)
				self.assertTrue(hasattr(UpperCamelCase__   ,     '''do_convert_rgb'''	)	)



		def 	lowerCAmelCase							(	self							:       Any	)		->       Dict:






				"""simple docstring"""







				pass



		def 	lowerCAmelCase							(	self							:       List[str]	)		->       Tuple:






				"""simple docstring"""







				snake_case   :    Optional[Any]			       =		self.image_processing_class(**self.image_processor_dict	)
				# create random PIL images
				snake_case   :    Union[str, Any]			       =		self.image_processor_tester.prepare_inputs(equal_resolution=UpperCamelCase__	)
				for image in image_inputs:
						self.assertIsInstance(UpperCamelCase__   ,     Image.Image	)

				# Test not batched input
				snake_case   :    Optional[int]			       =		image_processor(image_inputs[0]   ,     return_tensors='''pt'''	).pixel_values
				self.assertEqual(
				    encoded_images.shape   ,     (
				        1,
				        self.image_processor_tester.num_channels,
				        self.image_processor_tester.size['''height'''],
				        self.image_processor_tester.size['''width'''],
				    )   ,     )

				# Test batched
				snake_case   :    int			       =		image_processor(UpperCamelCase__   ,     return_tensors='''pt'''	).pixel_values
				self.assertEqual(
				    encoded_images.shape   ,     (
				        self.image_processor_tester.batch_size,
				        self.image_processor_tester.num_channels,
				        self.image_processor_tester.size['''height'''],
				        self.image_processor_tester.size['''width'''],
				    )   ,     )



		def 	lowerCAmelCase							(	self							:       List[str]	)		->       Tuple:






				"""simple docstring"""







				snake_case   :    Any			       =		self.image_processing_class(**self.image_processor_dict	)
				# create random numpy tensors
				snake_case   :    List[str]			       =		self.image_processor_tester.prepare_inputs(equal_resolution=UpperCamelCase__   ,     numpify=UpperCamelCase__	)
				for image in image_inputs:
						self.assertIsInstance(UpperCamelCase__   ,     np.ndarray	)

				# Test not batched input
				snake_case   :    Dict			       =		image_processor(image_inputs[0]   ,     return_tensors='''pt'''	).pixel_values
				self.assertEqual(
				    encoded_images.shape   ,     (
				        1,
				        self.image_processor_tester.num_channels,
				        self.image_processor_tester.size['''height'''],
				        self.image_processor_tester.size['''width'''],
				    )   ,     )

				# Test batched
				snake_case   :    Dict			       =		image_processor(UpperCamelCase__   ,     return_tensors='''pt'''	).pixel_values
				self.assertEqual(
				    encoded_images.shape   ,     (
				        self.image_processor_tester.batch_size,
				        self.image_processor_tester.num_channels,
				        self.image_processor_tester.size['''height'''],
				        self.image_processor_tester.size['''width'''],
				    )   ,     )



		def 	lowerCAmelCase							(	self							:       Dict	)		->       Union[str, Any]:






				"""simple docstring"""







				snake_case   :    Union[str, Any]			       =		self.image_processing_class(**self.image_processor_dict	)
				# create random PyTorch tensors
				snake_case   :    List[Any]			       =		self.image_processor_tester.prepare_inputs(equal_resolution=UpperCamelCase__   ,     torchify=UpperCamelCase__	)
				for image in image_inputs:
						self.assertIsInstance(UpperCamelCase__   ,     torch.Tensor	)

				# Test not batched input
				snake_case   :    List[str]			       =		image_processor(image_inputs[0]   ,     return_tensors='''pt'''	).pixel_values
				self.assertEqual(
				    encoded_images.shape   ,     (
				        1,
				        self.image_processor_tester.num_channels,
				        self.image_processor_tester.size['''height'''],
				        self.image_processor_tester.size['''width'''],
				    )   ,     )

				# Test batched
				snake_case   :    str			       =		image_processor(UpperCamelCase__   ,     return_tensors='''pt'''	).pixel_values
				self.assertEqual(
				    encoded_images.shape   ,     (
				        self.image_processor_tester.batch_size,
				        self.image_processor_tester.num_channels,
				        self.image_processor_tester.size['''height'''],
				        self.image_processor_tester.size['''width'''],
				    )   ,     )







@require_torch
@require_vision
class      snake_case__    (	__SCREAMING_SNAKE_CASE  , unittest.TestCase ):







		"""simple docstring"""

		lowerCamelCase							=		BlipImageProcessor if is_vision_available() else None



		def 	lowerCAmelCase							(	self							:       Tuple	)		->       Union[str, Any]:






				"""simple docstring"""







				snake_case   :    Union[str, Any]			       =		BlipImageProcessingTester(self   ,     num_channels=4	)
				snake_case   :    Optional[int]			       =		3



		@property
		def 	lowerCAmelCase							(	self							:       Optional[int]	)		->       Tuple:






				"""simple docstring"""







				return self.image_processor_tester.prepare_image_processor_dict()



		def 	lowerCAmelCase							(	self							:       List[Any]	)		->       Any:






				"""simple docstring"""







				snake_case   :    Union[str, Any]			       =		self.image_processing_class(**self.image_processor_dict	)
				self.assertTrue(hasattr(UpperCamelCase__   ,     '''do_resize'''	)	)
				self.assertTrue(hasattr(UpperCamelCase__   ,     '''size'''	)	)
				self.assertTrue(hasattr(UpperCamelCase__   ,     '''do_normalize'''	)	)
				self.assertTrue(hasattr(UpperCamelCase__   ,     '''image_mean'''	)	)
				self.assertTrue(hasattr(UpperCamelCase__   ,     '''image_std'''	)	)
				self.assertTrue(hasattr(UpperCamelCase__   ,     '''do_convert_rgb'''	)	)



		def 	lowerCAmelCase							(	self							:       Optional[Any]	)		->       List[str]:






				"""simple docstring"""







				pass



		def 	lowerCAmelCase							(	self							:       Optional[int]	)		->       Any:






				"""simple docstring"""







				snake_case   :    Optional[Any]			       =		self.image_processing_class(**self.image_processor_dict	)
				# create random PIL images
				snake_case   :    Tuple			       =		self.image_processor_tester.prepare_inputs(equal_resolution=UpperCamelCase__	)
				for image in image_inputs:
						self.assertIsInstance(UpperCamelCase__   ,     Image.Image	)

				# Test not batched input
				snake_case   :    int			       =		image_processor(image_inputs[0]   ,     return_tensors='''pt'''	).pixel_values
				self.assertEqual(
				    encoded_images.shape   ,     (
				        1,
				        self.expected_encoded_image_num_channels,
				        self.image_processor_tester.size['''height'''],
				        self.image_processor_tester.size['''width'''],
				    )   ,     )

				# Test batched
				snake_case   :    Union[str, Any]			       =		image_processor(UpperCamelCase__   ,     return_tensors='''pt'''	).pixel_values
				self.assertEqual(
				    encoded_images.shape   ,     (
				        self.image_processor_tester.batch_size,
				        self.expected_encoded_image_num_channels,
				        self.image_processor_tester.size['''height'''],
				        self.image_processor_tester.size['''width'''],
				    )   ,     )


