

"""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        __lowercase     (      __lowerCamelCase   ):
  snake_case_			    =    4_2







class        __lowercase     (      unittest.TestCase   ):

  def 				__lowercase    (					self						:     str      ):






   '''simple docstring'''
   UpperCAmelCase__   :					Tuple   				=   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
   UpperCAmelCase__   :					Optional[int]   				=   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 				__lowercase    (					self						:     Optional[int]      ):






   '''simple docstring'''
   UpperCAmelCase__   :					Optional[int]   				=   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
   UpperCAmelCase__   :					List[str]   				=   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"""




from math import factorial
def 					lowerCAmelCase  (   __UpperCamelCase							,      __UpperCamelCase ):
 '''simple docstring'''





 return factorial(__UpperCamelCase ) / (factorial(__UpperCamelCase ) * factorial(n - r ))
def 					lowerCAmelCase  (   ):
 '''simple docstring'''





 UpperCAmelCase__   :					Any   				=   0

 for i in range(1							,      101 ):
  for j in range(1							,      i + 1 ):
   if combinations(__UpperCamelCase							,      __UpperCamelCase ) > 1e6:
    total += 1
 return total


if __name__ == "__main__":
      print(solution())





