

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  UpperCamelCase_      (	_snake_case      ):


  """simple docstring"""
  SCREAMING_SNAKE_CASE__					:			Union[List[PIL.Image.Image], np.ndarray]







class  UpperCamelCase_      (	unittest.TestCase      ):


  """simple docstring"""



  def   _UpperCamelCase     (						self     :					Union[str, Any]						)       ->			int:
      SCREAMING_SNAKE_CASE__         =    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
      SCREAMING_SNAKE_CASE__         =    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   _UpperCamelCase     (						self     :					Tuple						)       ->			Optional[int]:
      # test output reinitialization with a `dict` for compatibility with `accelerate`
      SCREAMING_SNAKE_CASE__         =    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
      SCREAMING_SNAKE_CASE__         =    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						)





from __future__ import annotations





def 				__a							(       __A						):
    SCREAMING_SNAKE_CASE__         =    {1}
    SCREAMING_SNAKE_CASE__         =    [1]
    for _ in range(2			,							depth + 1						):
        SCREAMING_SNAKE_CASE__         =    [*previous_coefficients, 0]
        SCREAMING_SNAKE_CASE__         =    [0, *previous_coefficients]
        SCREAMING_SNAKE_CASE__         =    []
        for x, y in zip(__A			,							__A						):
            coefficients.add(x + y						)
            previous_coefficients.append(x + y						)
    return coefficients





def 				__a							(       __A						):
    SCREAMING_SNAKE_CASE__         =    set()
    for number in unique_coefficients:
        SCREAMING_SNAKE_CASE__         =    2
        SCREAMING_SNAKE_CASE__         =    number
        while divisor**2 <= copy_number:
            SCREAMING_SNAKE_CASE__         =    0
            while copy_number % divisor == 0:
                copy_number //= divisor
                multiplicity += 1
            if multiplicity >= 2:
                non_squarefrees.add(__A						)
                break
            divisor += 1

    return unique_coefficients.difference(__A						)





def 				__a							(       __A = 51						):
    SCREAMING_SNAKE_CASE__         =    get_pascal_triangle_unique_coefficients(__A						)
    SCREAMING_SNAKE_CASE__         =    get_squarefrees(__A						)
    return sum(__A						)


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


