


"""simple docstring"""


import unittest
from dataclasses import dataclass
from typing import List, Union

import numpy as np
import PIL.Image

from diffusers.utils.outputs import BaseOutput
@dataclass
class snake_case					(     _UpperCamelCase):
		__UpperCamelCase							=	42





class snake_case					(     unittest.TestCase):







		def        a_       (    self					:				Any						)				->  Tuple:





						'''simple docstring'''







						_A         =	CustomOutput(images=np.random.rand(1			,      3			,      4			,      4						)						)

						# check every way of getting the attribute
						assert isinstance(outputs.images			,      np.ndarray						)
						assert outputs.images.shape == (1, 3, 4, 4)
						assert isinstance(outputs["images"]			,      np.ndarray						)
						assert outputs["images"].shape == (1, 3, 4, 4)
						assert isinstance(outputs[0]			,      np.ndarray						)
						assert outputs[0].shape == (1, 3, 4, 4)

						# test with a non-tensor attribute
						_A         =	CustomOutput(images=[PIL.Image.new("RGB"			,      (4, 4)						)]						)

						# check every way of getting the attribute
						assert isinstance(outputs.images			,      a__						)
						assert isinstance(outputs.images[0]			,      PIL.Image.Image						)
						assert isinstance(outputs["images"]			,      a__						)
						assert isinstance(outputs["images"][0]			,      PIL.Image.Image						)
						assert isinstance(outputs[0]			,      a__						)
						assert isinstance(outputs[0][0]			,      PIL.Image.Image						)







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





						'''simple docstring'''







						_A         =	CustomOutput({"images": np.random.rand(1			,      3			,      4			,      4						)}						)

						# check every way of getting the attribute
						assert isinstance(outputs.images			,      np.ndarray						)
						assert outputs.images.shape == (1, 3, 4, 4)
						assert isinstance(outputs["images"]			,      np.ndarray						)
						assert outputs["images"].shape == (1, 3, 4, 4)
						assert isinstance(outputs[0]			,      np.ndarray						)
						assert outputs[0].shape == (1, 3, 4, 4)

						# test with a non-tensor attribute
						_A         =	CustomOutput({"images": [PIL.Image.new("RGB"			,      (4, 4)						)]}						)

						# check every way of getting the attribute
						assert isinstance(outputs.images			,      a__						)
						assert isinstance(outputs.images[0]			,      PIL.Image.Image						)
						assert isinstance(outputs["images"]			,      a__						)
						assert isinstance(outputs["images"][0]			,      PIL.Image.Image						)
						assert isinstance(outputs[0]			,      a__						)
						assert isinstance(outputs[0][0]			,      PIL.Image.Image						)



"""simple docstring"""


import warnings

from ...utils import logging
from .image_processing_mobilenet_va import MobileNetVaImageProcessor


a_											=			logging.get_logger(__name__)
class snake_case					(     _UpperCamelCase):







		def __init__(    self					:				str			,      *a__					:				Union[str, Any]			,      **a__					:				Optional[Any]						)				->  None:





						'''simple docstring'''







						warnings.warn(
						    "The class MobileNetV2FeatureExtractor is deprecated and will be removed in version 5 of Transformers."
						    " Please use MobileNetV2ImageProcessor instead."			,      a__			,      )
						super().__init__(*a__			,      **a__						)