





'''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 							__SCREAMING_SNAKE_CASE			(       lowerCAmelCase__      ):
      '''simple docstring'''



      lowerCAmelCase__       :      Union[List[PIL.Image.Image], np.ndarray]



class 							__SCREAMING_SNAKE_CASE			(       unittest.TestCase      ):
      '''simple docstring'''



      def   _lowerCamelCase		(							self    : Any  )		->  Union[str, Any]:
           _lowercase							:      List[str]  						=							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							:      List[str]  						=							CustomOutput(images=[PIL.Image.new('RGB'   ,(4, 4)  )]  )

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



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

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






'''simple docstring'''







def 		SCREAMING_SNAKE_CASE      (					lowerCAmelCase__     :	str)			->						str:

     '''simple docstring'''




     return " ".join(sorted(set(sentence.split())))


if __name__ == "__main__":
    import doctest

    doctest.testmod()