

import inspect
import unittest

class 					a	(						unittest.TestCase					):


						def 							_UpperCAmelCase					(							self						):







										'''simple docstring'''


										try:
														import diffusers  # noqa: F401
										except ImportError:
														assert False





						def 							_UpperCAmelCase					(							self						):







										'''simple docstring'''


										import diffusers
										from diffusers.dependency_versions_table import deps

										_UpperCAmelCase							:		str					=     inspect.getmembers(SCREAMING_SNAKE_CASE_    ,       inspect.isclass						)

										for cls_name, cls_module in all_classes:
														if "dummy_" in cls_module.__module__:
																		for backend in cls_module._backends:
																						if backend == "k_diffusion":
																										_UpperCAmelCase							:		Any					=     "k-diffusion"
																						elif backend == "invisible_watermark":
																										_UpperCAmelCase							:		str					=     "invisible-watermark"
																						assert backend in deps, f'{backend} is not in the deps table!'




"""simple docstring"""




import doctest
from collections import deque

import numpy as np





class 			snake_case  :

							def __init__(self     ):

									"""simple docstring"""







									SCREAMING_SNAKE_CASE_    			=			[2, 1, 2, -1]
									SCREAMING_SNAKE_CASE_    			=			[1, 2, 3, 4]







							def _lowercase       (self     ):

									"""simple docstring"""







									SCREAMING_SNAKE_CASE_    			=			len(self.first_signal     )
									SCREAMING_SNAKE_CASE_    			=			len(self.second_signal     )

									SCREAMING_SNAKE_CASE_    			=			max(SCREAMING_SNAKE_CASE_							,							SCREAMING_SNAKE_CASE_     )

									# create a zero matrix of max_length x max_length
									SCREAMING_SNAKE_CASE_    			=			[[0] * max_length for i in range(SCREAMING_SNAKE_CASE_     )]

									# fills the smaller signal with zeros to make both signals of same length
									if length_first_signal < length_second_signal:
											self.first_signal += [0] * (max_length - length_first_signal)
									elif length_first_signal > length_second_signal:
											self.second_signal += [0] * (max_length - length_second_signal)
									for i in range(SCREAMING_SNAKE_CASE_     ):
											SCREAMING_SNAKE_CASE_    			=			deque(self.second_signal     )
											rotated_signal.rotate(SCREAMING_SNAKE_CASE_     )
											for j, item in enumerate(SCREAMING_SNAKE_CASE_     ):
													matrix[i][j] += item

        # multiply the matrix with the first signal
									SCREAMING_SNAKE_CASE_    			=			np.matmul(np.transpose(SCREAMING_SNAKE_CASE_     )							,							np.transpose(self.first_signal     )     )

									# rounding-off to two decimal places
									return [round(SCREAMING_SNAKE_CASE_							,							2     ) for i in final_signal]


if __name__ == "__main__":
						doctest.testmod()