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 	_a  (							lowerCamelCase_					):



	"""simple docstring"""



	__SCREAMING_SNAKE_CASE              =					42

class 	_a  (							unittest.TestCase					):



	"""simple docstring"""



	def __lowerCAmelCase      (   self       ):
		_lowercase   =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
		_lowercase   =CustomOutput(images=[PIL.Image.new("RGB"       ,  (4, 4)       )]       )

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


	def __lowerCAmelCase      (   self       ):
		# test output reinitialization with a `dict` for compatibility with `accelerate`
		_lowercase   =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
		_lowercase   =CustomOutput({"images": [PIL.Image.new("RGB"       ,  (4, 4)       )]}       )

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







"""simple docstring"""




import sys

sys.set_int_max_str_digits(0)  # type: ignore
def   __SCREAMING_SNAKE_CASE		(		lowercase__ ):
					"""simple docstring"""
					A     =   [0] * 11
					A     =   [0] * 11

					# mark last 9 numbers
					for _ in range(9 ):
										A     =   1
										A     =   number // 10
					# flag
					A     =   True

					# check last 9 numbers for pandigitality

					for x in range(9 ):
										if not check_last[x + 1]:
															A     =   False
					if not f:
										return f

					# mark first 9 numbers
					A     =   int(str(lowercase__ )[:9] )

					for _ in range(9 ):
										A     =   1
										A     =   number // 10

					# check first 9 numbers for pandigitality

					for x in range(9 ):
										if not check_front[x + 1]:
															A     =   False
					return f
def   __SCREAMING_SNAKE_CASE		(		lowercase__ ):
					"""simple docstring"""
					A     =   [0] * 11

					# mark last 9 numbers
					for _ in range(9 ):
										A     =   1
										A     =   number // 10
					# flag
					A     =   True

					# check last 9 numbers for pandigitality

					for x in range(9 ):
										if not check_last[x + 1]:
															A     =   False
					return f
def   __SCREAMING_SNAKE_CASE		(		):
					"""simple docstring"""
					A     =   1
					A     =   1
					A     =   2
					# temporary Fibonacci numbers

					A     =   1
					A     =   1
					A     =   2
					# temporary Fibonacci numbers mod 1e9

					# mod m=1e9, done for fast optimisation
					A     =   [0] * 1_000_000
					A     =   1_000_000_000

					for x in range(1_000_000 ):
										A     =   (aa + ba) % m
										A     =   ba % m
										A     =   ca % m
										if checka(lowercase__ ):
															A     =   1

					for x in range(1_000_000 ):
										A     =   a + b
										A     =   b
										A     =   c
										# perform check only if in tocheck
										if tocheck[x + 3] and check(lowercase__ ):
															return x + 3  # first 2 already done
					return -1


if __name__ == "__main__":
	print(f"""{solution() = }""")





