


'''simple docstring'''






import inspect
import unittest

from transformers import MobileViTVaConfig
from transformers.testing_utils import require_torch, require_torch_multi_gpu, require_vision, slow, torch_device
from transformers.utils import cached_property, is_torch_available, is_vision_available

from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin, floats_tensor, ids_tensor
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
							import torch

							from transformers import MobileViTVaForImageClassification, MobileViTVaForSemanticSegmentation, MobileViTVaModel
							from transformers.models.mobilevitva.modeling_mobilevitva import (
							    MOBILEVITV2_PRETRAINED_MODEL_ARCHIVE_LIST,
							    make_divisible,
							)


if is_vision_available():
							from PIL import Image

							from transformers import MobileViTImageProcessor
class 						__UpperCamelCase	(						lowerCamelCase__							):





							def 		a__   (  self		:int			):
									snake_case_		:							Optional[int]			       =						self.config_class(**self.inputs_dict			)
									self.parent.assertTrue(hasattr(__lowerCamelCase  ,"""width_multiplier"""			)			)





class 						__UpperCamelCase	:





							def __init__(  self		:Optional[int]  ,_UpperCamelCase		:int  ,_UpperCamelCase		:Optional[Any]=1_3  ,_UpperCamelCase		:int=6_4  ,_UpperCamelCase		:Optional[int]=2  ,_UpperCamelCase		:Union[str, Any]=3  ,_UpperCamelCase		:Dict="swish"  ,_UpperCamelCase		:Optional[int]=3  ,_UpperCamelCase		:Dict=3_2  ,_UpperCamelCase		:str=0.1  ,_UpperCamelCase		:Union[str, Any]=0.02  ,_UpperCamelCase		:List[str]=True  ,_UpperCamelCase		:str=True  ,_UpperCamelCase		:str=1_0  ,_UpperCamelCase		:int=None  ,_UpperCamelCase		:List[Any]=0.25  ,_UpperCamelCase		:int=0.0  ,_UpperCamelCase		:Optional[int]=0.0  ,):
									snake_case_		:							Dict			       =						parent
									snake_case_		:							List[str]			       =						batch_size
									snake_case_		:							Dict			       =						image_size
									snake_case_		:							Tuple			       =						patch_size
									snake_case_		:							List[Any]			       =						num_channels
									snake_case_		:							Tuple			       =						make_divisible(5_1_2 * width_multiplier  ,divisor=8			)
									snake_case_		:							Dict			       =						hidden_act
									snake_case_		:							Optional[int]			       =						conv_kernel_size
									snake_case_		:							int			       =						output_stride
									snake_case_		:							List[Any]			       =						classifier_dropout_prob
									snake_case_		:							Dict			       =						use_labels
									snake_case_		:							Tuple			       =						is_training
									snake_case_		:							str			       =						num_labels
									snake_case_		:							Optional[Any]			       =						initializer_range
									snake_case_		:							Tuple			       =						scope
									snake_case_		:							Tuple			       =						width_multiplier
									snake_case_		:							Optional[int]			       =						ffn_dropout
									snake_case_		:							Dict			       =						attn_dropout





							def 		a__   (  self		:int			):
									snake_case_		:							str			       =						floats_tensor([self.batch_size, self.num_channels, self.image_size, self.image_size]			)

									snake_case_		:							Union[str, Any]			       =						None
									snake_case_		:							Dict			       =						None
									if self.use_labels:
											snake_case_		:							Optional[Any]			       =						ids_tensor([self.batch_size]  ,self.num_labels			)
											snake_case_		:							Optional[Any]			       =						ids_tensor([self.batch_size, self.image_size, self.image_size]  ,self.num_labels			)

									snake_case_		:							Tuple			       =						self.get_config()

									return config, pixel_values, labels, pixel_labels





							def 		a__   (  self		:str			):
									return MobileViTVaConfig(
									    image_size=self.image_size  ,patch_size=self.patch_size  ,num_channels=self.num_channels  ,hidden_act=self.hidden_act  ,conv_kernel_size=self.conv_kernel_size  ,output_stride=self.output_stride  ,classifier_dropout_prob=self.classifier_dropout_prob  ,initializer_range=self.initializer_range  ,width_multiplier=self.width_multiplier  ,ffn_dropout=self.ffn_dropout_prob  ,attn_dropout=self.attn_dropout_prob  ,)





							def 		a__   (  self		:Optional[int]  ,_UpperCamelCase		:Any  ,_UpperCamelCase		:Any  ,_UpperCamelCase		:List[str]  ,_UpperCamelCase		:Union[str, Any]			):
									snake_case_		:							int			       =						MobileViTVaModel(config=__lowerCamelCase			)
									model.to(__lowerCamelCase			)
									model.eval()
									snake_case_		:							Dict			       =						model(__lowerCamelCase			)
									self.parent.assertEqual(
									    result.last_hidden_state.shape  ,(
									        self.batch_size,
									        self.last_hidden_size,
									        self.image_size // self.output_stride,
									        self.image_size // self.output_stride,
									    )  ,)





							def 		a__   (  self		:List[Any]  ,_UpperCamelCase		:Optional[int]  ,_UpperCamelCase		:Optional[Any]  ,_UpperCamelCase		:Optional[Any]  ,_UpperCamelCase		:Tuple			):
									snake_case_		:							List[str]			       =						self.num_labels
									snake_case_		:							Union[str, Any]			       =						MobileViTVaForImageClassification(__lowerCamelCase			)
									model.to(__lowerCamelCase			)
									model.eval()
									snake_case_		:							Dict			       =						model(__lowerCamelCase  ,labels=__lowerCamelCase			)
									self.parent.assertEqual(result.logits.shape  ,(self.batch_size, self.num_labels)			)





							def 		a__   (  self		:List[Any]  ,_UpperCamelCase		:Any  ,_UpperCamelCase		:Optional[Any]  ,_UpperCamelCase		:Optional[Any]  ,_UpperCamelCase		:Dict			):
									snake_case_		:							Any			       =						self.num_labels
									snake_case_		:							Optional[int]			       =						MobileViTVaForSemanticSegmentation(__lowerCamelCase			)
									model.to(__lowerCamelCase			)
									model.eval()
									snake_case_		:							Optional[Any]			       =						model(__lowerCamelCase			)
									self.parent.assertEqual(
									    result.logits.shape  ,(
									        self.batch_size,
									        self.num_labels,
									        self.image_size // self.output_stride,
									        self.image_size // self.output_stride,
									    )  ,)
									snake_case_		:							List[str]			       =						model(__lowerCamelCase  ,labels=__lowerCamelCase			)
									self.parent.assertEqual(
									    result.logits.shape  ,(
									        self.batch_size,
									        self.num_labels,
									        self.image_size // self.output_stride,
									        self.image_size // self.output_stride,
									    )  ,)





							def 		a__   (  self		:List[str]			):
									snake_case_		:							Union[str, Any]			       =						self.prepare_config_and_inputs()
									snake_case_		:							Optional[int]			       =						config_and_inputs
									snake_case_		:							Dict			       =						{'''pixel_values''': pixel_values}
									return config, inputs_dict





@require_torch
class 						__UpperCamelCase	(						lowerCamelCase__						,  lowerCamelCase__						,  unittest.TestCase							):
							lowercase			:		Optional[Any]   		=  (
							    (MobileViTVaModel, MobileViTVaForImageClassification, MobileViTVaForSemanticSegmentation)
							    if is_torch_available()
							    else ()
							)

							lowercase			:		int   		=  (
							    {
							        'feature-extraction': MobileViTVaModel,
							        'image-classification': MobileViTVaForImageClassification,
							        'image-segmentation': MobileViTVaForSemanticSegmentation,
							    }
							    if is_torch_available()
							    else {}
							)

							lowercase			:		Optional[Any]   		=  False
							lowercase			:		Tuple   		=  False
							lowercase			:		Optional[Any]   		=  False
							lowercase			:		List[str]   		=  False





							def 		a__   (  self		:Any			):
									snake_case_		:							Dict			       =						MobileViTVaModelTester(self			)
									snake_case_		:							Optional[int]			       =						MobileViTVaConfigTester(self  ,config_class=__lowerCamelCase  ,has_text_modality=__lowerCamelCase			)





							def 		a__   (  self		:Dict			):
									self.config_tester.run_common_tests()





							@unittest.skip(reason="""MobileViTV2 does not use inputs_embeds"""			)
							def 		a__   (  self		:Optional[int]			):
									pass





							@unittest.skip(reason="""MobileViTV2 does not support input and output embeddings"""			)
							def 		a__   (  self		:Union[str, Any]			):
									pass





							@unittest.skip(reason="""MobileViTV2 does not output attentions"""			)
							def 		a__   (  self		:Dict			):
									pass





							@require_torch_multi_gpu
							@unittest.skip(reason="""Got `CUDA error: misaligned address` for tests after this one being run."""			)
							def 		a__   (  self		:Tuple			):
									pass





							@unittest.skip("""Will be fixed soon by reducing the size of the model used for common tests."""			)
							def 		a__   (  self		:List[Any]			):
									pass





							def 		a__   (  self		:Optional[Any]			):
									snake_case_		:							List[Any]			       =						self.model_tester.prepare_config_and_inputs_for_common()

									for model_class in self.all_model_classes:
											snake_case_		:							Union[str, Any]			       =						model_class(__lowerCamelCase			)
											snake_case_		:							List[Any]			       =						inspect.signature(model.forward			)
											# signature.parameters is an OrderedDict => so arg_names order is deterministic
											snake_case_		:							str			       =						[*signature.parameters.keys()]

											snake_case_		:							Union[str, Any]			       =						['''pixel_values''']
											self.assertListEqual(arg_names[:1]  ,__lowerCamelCase			)





							def 		a__   (  self		:int			):
									snake_case_		:							List[Any]			       =						self.model_tester.prepare_config_and_inputs()
									self.model_tester.create_and_check_model(*__lowerCamelCase			)





							def 		a__   (  self		:Optional[int]			):






									def check_hidden_states_output(_UpperCamelCase		:List[str]  ,_UpperCamelCase		:Optional[Any]  ,_UpperCamelCase		:List[Any]			):
											snake_case_		:							Union[str, Any]			       =						model_class(__lowerCamelCase			)
											model.to(__lowerCamelCase			)
											model.eval()

											with torch.no_grad():
													snake_case_		:							Optional[Any]			       =						model(**self._prepare_for_class(__lowerCamelCase  ,__lowerCamelCase			)			)

											snake_case_		:							Dict			       =						outputs.hidden_states

											snake_case_		:							Any			       =						5
											self.assertEqual(len(__lowerCamelCase			)  ,__lowerCamelCase			)

											# MobileViTV2's feature maps are of shape (batch_size, num_channels, height, width)
											# with the width and height being successively divided by 2.
											snake_case_		:							Optional[Any]			       =						2
											for i in range(len(__lowerCamelCase			)			):
													self.assertListEqual(
													    list(hidden_states[i].shape[-2:]			)  ,[self.model_tester.image_size // divisor, self.model_tester.image_size // divisor]  ,)
													divisor *= 2

											self.assertEqual(self.model_tester.output_stride  ,divisor // 2			)

									snake_case_		:							Union[str, Any]			       =						self.model_tester.prepare_config_and_inputs_for_common()

									for model_class in self.all_model_classes:
											snake_case_		:							Any			       =						True
											check_hidden_states_output(__lowerCamelCase  ,__lowerCamelCase  ,__lowerCamelCase			)

											# check that output_hidden_states also work using config
											del inputs_dict["output_hidden_states"]
											snake_case_		:							Tuple			       =						True

											check_hidden_states_output(__lowerCamelCase  ,__lowerCamelCase  ,__lowerCamelCase			)





							def 		a__   (  self		:Any			):
									snake_case_		:							Optional[Any]			       =						self.model_tester.prepare_config_and_inputs()
									self.model_tester.create_and_check_for_image_classification(*__lowerCamelCase			)





							def 		a__   (  self		:Optional[int]			):
									snake_case_		:							str			       =						self.model_tester.prepare_config_and_inputs()
									self.model_tester.create_and_check_for_semantic_segmentation(*__lowerCamelCase			)





							@slow
							def 		a__   (  self		:Any			):






									for model_name in MOBILEVITV2_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
											snake_case_		:							Optional[int]			       =						MobileViTVaModel.from_pretrained(__lowerCamelCase			)
											self.assertIsNotNone(__lowerCamelCase			)





def      UpperCAmelCase      (		):







		'''simple docstring'''
		snake_case_		:							Dict			       =						Image.open("""./tests/fixtures/tests_samples/COCO/000000039769.png""" )
		return image






@require_torch
@require_vision
class 						__UpperCamelCase	(						unittest.TestCase							):





							@cached_property
							def 		a__   (  self		:Optional[Any]			):
									return (
									    MobileViTImageProcessor.from_pretrained("""apple/mobilevitv2-1.0-imagenet1k-256"""			)
									    if is_vision_available()
									    else None
									)





							@slow
							def 		a__   (  self		:List[str]			):
									snake_case_		:							str			       =						MobileViTVaForImageClassification.from_pretrained("""apple/mobilevitv2-1.0-imagenet1k-256"""			).to(
									    __lowerCamelCase			)

									snake_case_		:							str			       =						self.default_image_processor
									snake_case_		:							Union[str, Any]			       =						prepare_img()
									snake_case_		:							int			       =						image_processor(images=__lowerCamelCase  ,return_tensors="""pt"""			).to(__lowerCamelCase			)

									# forward pass
									with torch.no_grad():
											snake_case_		:							Union[str, Any]			       =						model(**__lowerCamelCase			)

									# verify the logits
									snake_case_		:							str			       =						torch.Size((1, 1_0_0_0)			)
									self.assertEqual(outputs.logits.shape  ,__lowerCamelCase			)

									snake_case_		:							Dict			       =						torch.tensor([-1.6_3_3_6E0_0, -7.3_2_0_4E-0_2, -5.1_8_8_3E-0_1]			).to(__lowerCamelCase			)

									self.assertTrue(torch.allclose(outputs.logits[0, :3]  ,__lowerCamelCase  ,atol=1E-4			)			)





							@slow
							def 		a__   (  self		:Tuple			):
									snake_case_		:							Optional[int]			       =						MobileViTVaForSemanticSegmentation.from_pretrained("""shehan97/mobilevitv2-1.0-voc-deeplabv3"""			)
									snake_case_		:							Optional[Any]			       =						model.to(__lowerCamelCase			)

									snake_case_		:							List[Any]			       =						MobileViTImageProcessor.from_pretrained("""shehan97/mobilevitv2-1.0-voc-deeplabv3"""			)

									snake_case_		:							Optional[Any]			       =						prepare_img()
									snake_case_		:							Union[str, Any]			       =						image_processor(images=__lowerCamelCase  ,return_tensors="""pt"""			).to(__lowerCamelCase			)

									# forward pass
									with torch.no_grad():
											snake_case_		:							List[Any]			       =						model(**__lowerCamelCase			)
									snake_case_		:							Tuple			       =						outputs.logits

									# verify the logits
									snake_case_		:							Optional[int]			       =						torch.Size((1, 2_1, 3_2, 3_2)			)
									self.assertEqual(logits.shape  ,__lowerCamelCase			)

									snake_case_		:							List[Any]			       =						torch.tensor(
									    [
									        [[7.08_63, 7.15_25, 6.82_01], [6.69_31, 6.87_70, 6.89_33], [6.29_78, 7.03_66, 6.96_36]],
									        [[-3.71_34, -3.67_12, -3.66_75], [-3.58_25, -3.35_49, -3.47_77], [-3.34_35, -3.39_79, -3.28_57]],
									        [[-2.93_29, -2.80_03, -2.73_69], [-3.05_64, -2.47_80, -2.02_07], [-2.68_89, -1.92_98, -1.76_40]],
									    ]  ,device=__lowerCamelCase  ,)

									self.assertTrue(torch.allclose(logits[0, :3, :3, :3]  ,__lowerCamelCase  ,atol=1E-4			)			)





							@slow
							def 		a__   (  self		:Optional[Any]			):
									snake_case_		:							Dict			       =						MobileViTVaForSemanticSegmentation.from_pretrained("""shehan97/mobilevitv2-1.0-voc-deeplabv3"""			)
									snake_case_		:							Dict			       =						model.to(__lowerCamelCase			)

									snake_case_		:							Tuple			       =						MobileViTImageProcessor.from_pretrained("""shehan97/mobilevitv2-1.0-voc-deeplabv3"""			)

									snake_case_		:							int			       =						prepare_img()
									snake_case_		:							Any			       =						image_processor(images=__lowerCamelCase  ,return_tensors="""pt"""			).to(__lowerCamelCase			)

									# forward pass
									with torch.no_grad():
											snake_case_		:							List[Any]			       =						model(**__lowerCamelCase			)

									snake_case_		:							Optional[Any]			       =						outputs.logits.detach().cpu()

									snake_case_		:							Optional[Any]			       =						image_processor.post_process_semantic_segmentation(outputs=__lowerCamelCase  ,target_sizes=[(5_0, 6_0)]			)
									snake_case_		:							Tuple			       =						torch.Size((5_0, 6_0)			)
									self.assertEqual(segmentation[0].shape  ,__lowerCamelCase			)

									snake_case_		:							Optional[Any]			       =						image_processor.post_process_semantic_segmentation(outputs=__lowerCamelCase			)
									snake_case_		:							Optional[Any]			       =						torch.Size((3_2, 3_2)			)
									self.assertEqual(segmentation[0].shape  ,__lowerCamelCase			)



'''simple docstring'''






from __future__ import annotations

import math





def      UpperCAmelCase      (		lowerCamelCase_  :list				,      lowerCamelCase_  :list ):







		'''simple docstring'''
		if len(lowerCamelCase_ ) != 2 or len(a[0] ) != 2 or len(lowerCamelCase_ ) != 2 or len(b[0] ) != 2:
				raise Exception("""Matrices are not 2x2""" )
		snake_case_		:							Tuple			       =						[
		    [a[0][0] * b[0][0] + a[0][1] * b[1][0], a[0][0] * b[0][1] + a[0][1] * b[1][1]],
		    [a[1][0] * b[0][0] + a[1][1] * b[1][0], a[1][0] * b[0][1] + a[1][1] * b[1][1]],
		]
		return new_matrix





def      UpperCAmelCase      (		lowerCamelCase_  :list				,      lowerCamelCase_  :list ):







		'''simple docstring'''
		return [
		    [matrix_a[row][col] + matrix_b[row][col] for col in range(len(matrix_a[row] ) )]
		    for row in range(len(lowerCamelCase_ ) )
		]





def      UpperCAmelCase      (		lowerCamelCase_  :list				,      lowerCamelCase_  :list ):







		'''simple docstring'''
		return [
		    [matrix_a[row][col] - matrix_b[row][col] for col in range(len(matrix_a[row] ) )]
		    for row in range(len(lowerCamelCase_ ) )
		]





def      UpperCAmelCase      (		lowerCamelCase_  :list ):







		'''simple docstring'''
		if len(lowerCamelCase_ ) % 2 != 0 or len(a[0] ) % 2 != 0:
				raise Exception("""Odd matrices are not supported!""" )

		snake_case_		:							Optional[int]			       =						len(lowerCamelCase_ )
		snake_case_		:							List[str]			       =						matrix_length // 2

		snake_case_		:							Union[str, Any]			       =						[[a[i][j] for j in range(lowerCamelCase_				,      lowerCamelCase_ )] for i in range(lowerCamelCase_ )]
		snake_case_		:							Dict			       =						[
		    [a[i][j] for j in range(lowerCamelCase_				,      lowerCamelCase_ )] for i in range(lowerCamelCase_				,      lowerCamelCase_ )
		]

		snake_case_		:							str			       =						[[a[i][j] for j in range(lowerCamelCase_ )] for i in range(lowerCamelCase_ )]
		snake_case_		:							Dict			       =						[[a[i][j] for j in range(lowerCamelCase_ )] for i in range(lowerCamelCase_				,      lowerCamelCase_ )]

		return top_left, top_right, bot_left, bot_right





def      UpperCAmelCase      (		lowerCamelCase_  :list ):







		'''simple docstring'''
		return len(lowerCamelCase_ ), len(matrix[0] )





def      UpperCAmelCase      (		lowerCamelCase_  :list ):







		'''simple docstring'''
		print("""\n""".join(str(lowerCamelCase_ ) for line in matrix ) )





def      UpperCAmelCase      (		lowerCamelCase_  :list				,      lowerCamelCase_  :list ):







		'''simple docstring'''
		if matrix_dimensions(lowerCamelCase_ ) == (2, 2):
				return default_matrix_multiplication(lowerCamelCase_				,      lowerCamelCase_ )

		snake_case_       ,      snake_case_       ,      snake_case_       ,      snake_case_		:							Any			       =						split_matrix(lowerCamelCase_ )
		snake_case_       ,      snake_case_       ,      snake_case_       ,      snake_case_		:							List[Any]			       =						split_matrix(lowerCamelCase_ )

		snake_case_		:							Any			       =						actual_strassen(lowerCamelCase_				,      matrix_subtraction(lowerCamelCase_				,      lowerCamelCase_ ) )
		snake_case_		:							str			       =						actual_strassen(matrix_addition(lowerCamelCase_				,      lowerCamelCase_ )				,      lowerCamelCase_ )
		snake_case_		:							str			       =						actual_strassen(matrix_addition(lowerCamelCase_				,      lowerCamelCase_ )				,      lowerCamelCase_ )
		snake_case_		:							List[str]			       =						actual_strassen(lowerCamelCase_				,      matrix_subtraction(lowerCamelCase_				,      lowerCamelCase_ ) )
		snake_case_		:							Optional[int]			       =						actual_strassen(matrix_addition(lowerCamelCase_				,      lowerCamelCase_ )				,      matrix_addition(lowerCamelCase_				,      lowerCamelCase_ ) )
		snake_case_		:							Dict			       =						actual_strassen(matrix_subtraction(lowerCamelCase_				,      lowerCamelCase_ )				,      matrix_addition(lowerCamelCase_				,      lowerCamelCase_ ) )
		snake_case_		:							int			       =						actual_strassen(matrix_subtraction(lowerCamelCase_				,      lowerCamelCase_ )				,      matrix_addition(lowerCamelCase_				,      lowerCamelCase_ ) )

		snake_case_		:							List[Any]			       =						matrix_addition(matrix_subtraction(matrix_addition(lowerCamelCase_				,      lowerCamelCase_ )				,      lowerCamelCase_ )				,      lowerCamelCase_ )
		snake_case_		:							List[Any]			       =						matrix_addition(lowerCamelCase_				,      lowerCamelCase_ )
		snake_case_		:							str			       =						matrix_addition(lowerCamelCase_				,      lowerCamelCase_ )
		snake_case_		:							Any			       =						matrix_subtraction(matrix_subtraction(matrix_addition(lowerCamelCase_				,      lowerCamelCase_ )				,      lowerCamelCase_ )				,      lowerCamelCase_ )

		# construct the new matrix from our 4 quadrants
		snake_case_		:							Dict			       =						[]
		for i in range(len(lowerCamelCase_ ) ):
				new_matrix.append(top_left[i] + top_right[i] )
		for i in range(len(lowerCamelCase_ ) ):
				new_matrix.append(bot_left[i] + bot_right[i] )
		return new_matrix





def      UpperCAmelCase      (		lowerCamelCase_  :list				,      lowerCamelCase_  :list ):







		'''simple docstring'''
		if matrix_dimensions(lowerCamelCase_ )[1] != matrix_dimensions(lowerCamelCase_ )[0]:
				snake_case_		:							Optional[int]			       =						(
				    """Unable to multiply these matrices, please check the dimensions.\n"""
				    F'''Matrix A: {matrixa}\n'''
				    F'''Matrix B: {matrixa}'''
				)
				raise Exception(lowerCamelCase_ )
		snake_case_		:							Tuple			       =						matrix_dimensions(lowerCamelCase_ )
		snake_case_		:							Union[str, Any]			       =						matrix_dimensions(lowerCamelCase_ )

		if dimensiona[0] == dimensiona[1] and dimensiona[0] == dimensiona[1]:
				return [matrixa, matrixa]

		snake_case_		:							int			       =						max(*lowerCamelCase_				,      *lowerCamelCase_ )
		snake_case_		:							Union[str, Any]			       =						int(math.pow(2				,      math.ceil(math.loga(lowerCamelCase_ ) ) ) )
		snake_case_		:							Dict			       =						matrixa
		snake_case_		:							Optional[int]			       =						matrixa

		# Adding zeros to the matrices so that the arrays dimensions are the same and also
		# power of 2
		for i in range(0				,      lowerCamelCase_ ):
				if i < dimensiona[0]:
						for _ in range(dimensiona[1]				,      lowerCamelCase_ ):
								new_matrixa[i].append(0 )
				else:
						new_matrixa.append([0] * maxim )
				if i < dimensiona[0]:
						for _ in range(dimensiona[1]				,      lowerCamelCase_ ):
								new_matrixa[i].append(0 )
				else:
						new_matrixa.append([0] * maxim )

		snake_case_		:							Dict			       =						actual_strassen(lowerCamelCase_				,      lowerCamelCase_ )

		# Removing the additional zeros
		for i in range(0				,      lowerCamelCase_ ):
				if i < dimensiona[0]:
						for _ in range(dimensiona[1]				,      lowerCamelCase_ ):
								final_matrix[i].pop()
				else:
						final_matrix.pop()
		return final_matrix


if __name__ == "__main__":
							__A	:	Optional[int]     =     [
							    [2, 3, 4, 5],
							    [6, 4, 3, 1],
							    [2, 3, 6, 7],
							    [3, 1, 2, 4],
							    [2, 3, 4, 5],
							    [6, 4, 3, 1],
							    [2, 3, 6, 7],
							    [3, 1, 2, 4],
							    [2, 3, 4, 5],
							    [6, 2, 3, 1],
							]
							__A	:	List[str]     =     [[0, 2, 1, 1], [16, 2, 3, 3], [2, 2, 7, 7], [13, 11, 22, 4]]
							print(strassen(matrixa, matrixa))