code: 
  
  
  
  
  
  
  import logging
  
  # standard libraries
  import sys
  
  import numpy as np
  import pytest  # type: ignore
  
  # Custom/local libraries
  from matrix import matrix_operation as matop
  
  SCREAMING_SNAKE_CASE__		:       List[Any]   							=							[[12, 10], [3, 9]]
  SCREAMING_SNAKE_CASE__		:       Any   							=							[[3, 4], [7, 4]]
  SCREAMING_SNAKE_CASE__		:       List[Any]   							=							[[3, 0, 2], [2, 0, -2], [0, 1, 1]]
  SCREAMING_SNAKE_CASE__		:       int   							=							[[3, 0, -2], [2, 0, 2], [0, 1, 1]]
  SCREAMING_SNAKE_CASE__		:       List[str]   							=							[[3, 0, 2], [2, 0, -2], [0, 1, 1], [2, 0, -2]]
  SCREAMING_SNAKE_CASE__		:       List[str]   							=							[1]
  SCREAMING_SNAKE_CASE__		:       Dict   							=							[2]
  
  SCREAMING_SNAKE_CASE__		:       Optional[Any]   							=							logging.getLogger()
  SCREAMING_SNAKE_CASE__		:       str   							=							logging.DEBUG
  SCREAMING_SNAKE_CASE__		:       Union[str, Any]   							=							logging.StreamHandler(sys.stdout)
  logger.addHandler(stream_handler)
  
  
  
  
  
  @pytest.mark.mat_ops
  @pytest.mark.parametrize(
      ("""mat1""", """mat2""")   ,       [(mat_a, mat_b), (mat_c, mat_d), (mat_d, mat_e), (mat_f, mat_h)]					)
  def    _lowerCamelCase	(	__lowerCamelCase   ,       __lowerCamelCase					)   -> Optional[int]:
  
  					'''simple docstring'''
  					if (np.array(__lowerCamelCase					)).shape < (2, 2) or (np.array(__lowerCamelCase					)).shape < (2, 2):
  										with pytest.raises(__lowerCamelCase					):
  															logger.info(F"\n\t{test_addition.__name__} returned integer"					)
  															matop.add(__lowerCamelCase   ,       __lowerCamelCase					)
  					elif (np.array(__lowerCamelCase					)).shape == (np.array(__lowerCamelCase					)).shape:
  										logger.info(F"\n\t{test_addition.__name__} with same matrix dims"					)
  										UpperCAmelCase__			:     Optional[Any]										= (np.array(__lowerCamelCase					) + np.array(__lowerCamelCase					)).tolist()
  										UpperCAmelCase__			:     Optional[int]										= matop.add(__lowerCamelCase   ,       __lowerCamelCase					)
  										assert theo == act
  					else:
  										with pytest.raises(__lowerCamelCase					):
  															logger.info(F"\n\t{test_addition.__name__} with different matrix dims"					)
  															matop.add(__lowerCamelCase   ,       __lowerCamelCase					)
  
  
  
  
  
  @pytest.mark.mat_ops
  @pytest.mark.parametrize(
      ("""mat1""", """mat2""")   ,       [(mat_a, mat_b), (mat_c, mat_d), (mat_d, mat_e), (mat_f, mat_h)]					)
  def    _lowerCamelCase	(	__lowerCamelCase   ,       __lowerCamelCase					)   -> Tuple:
  
  					'''simple docstring'''
  					if (np.array(__lowerCamelCase					)).shape < (2, 2) or (np.array(__lowerCamelCase					)).shape < (2, 2):
  										with pytest.raises(__lowerCamelCase					):
  															logger.info(F"\n\t{test_subtraction.__name__} returned integer"					)
  															matop.subtract(__lowerCamelCase   ,       __lowerCamelCase					)
  					elif (np.array(__lowerCamelCase					)).shape == (np.array(__lowerCamelCase					)).shape:
  										logger.info(F"\n\t{test_subtraction.__name__} with same matrix dims"					)
  										UpperCAmelCase__			:     Optional[int]										= (np.array(__lowerCamelCase					) - np.array(__lowerCamelCase					)).tolist()
  										UpperCAmelCase__			:     List[Any]										= matop.subtract(__lowerCamelCase   ,       __lowerCamelCase					)
  										assert theo == act
  					else:
  										with pytest.raises(__lowerCamelCase					):
  															logger.info(F"\n\t{test_subtraction.__name__} with different matrix dims"					)
  															assert matop.subtract(__lowerCamelCase   ,       __lowerCamelCase					)
  
  
  
  
  
  @pytest.mark.mat_ops
  @pytest.mark.parametrize(
      ("""mat1""", """mat2""")   ,       [(mat_a, mat_b), (mat_c, mat_d), (mat_d, mat_e), (mat_f, mat_h)]					)
  def    _lowerCamelCase	(	__lowerCamelCase   ,       __lowerCamelCase					)   -> Tuple:
  
  					'''simple docstring'''
  					if (np.array(__lowerCamelCase					)).shape < (2, 2) or (np.array(__lowerCamelCase					)).shape < (2, 2):
  										logger.info(F"\n\t{test_multiplication.__name__} returned integer"					)
  										with pytest.raises(__lowerCamelCase					):
  															matop.add(__lowerCamelCase   ,       __lowerCamelCase					)
  					elif (np.array(__lowerCamelCase					)).shape == (np.array(__lowerCamelCase					)).shape:
  										logger.info(F"\n\t{test_multiplication.__name__} meets dim requirements"					)
  										UpperCAmelCase__			:     List[Any]										= (np.matmul(__lowerCamelCase   ,       __lowerCamelCase					)).tolist()
  										UpperCAmelCase__			:     Dict										= matop.multiply(__lowerCamelCase   ,       __lowerCamelCase					)
  										assert theo == act
  					else:
  										with pytest.raises(__lowerCamelCase					):
  															logger.info(
  															    F"\n\t{test_multiplication.__name__} does not meet dim requirements"					)
  															assert matop.subtract(__lowerCamelCase   ,       __lowerCamelCase					)
  
  
  
  
  
  @pytest.mark.mat_ops
  def    _lowerCamelCase	(	)   -> Dict:
  
  					'''simple docstring'''
  					UpperCAmelCase__			:     Optional[Any]										= (3.5 * np.array(__lowerCamelCase					)).tolist()
  					UpperCAmelCase__			:     Tuple										= matop.scalar_multiply(__lowerCamelCase   ,       3.5					)
  					assert theo == act
  
  
  
  
  
  @pytest.mark.mat_ops
  def    _lowerCamelCase	(	)   -> int:
  
  					'''simple docstring'''
  					UpperCAmelCase__			:     Any										= (np.identity(5					)).tolist()
  					UpperCAmelCase__			:     str										= matop.identity(5					)
  					assert theo == act
  
  
  
  
  
  
  
  @pytest.mark.mat_ops
  @pytest.mark.parametrize("""mat"""   ,       [mat_a, mat_b, mat_c, mat_d, mat_e, mat_f]					)
  def    _lowerCamelCase	(	__lowerCamelCase					)   -> Optional[Any]:
  
  					'''simple docstring'''
  					if (np.array(__lowerCamelCase					)).shape < (2, 2):
  										with pytest.raises(__lowerCamelCase					):
  															logger.info(F"\n\t{test_transpose.__name__} returned integer"					)
  															matop.transpose(__lowerCamelCase					)
  					else:
  										UpperCAmelCase__			:     Union[str, Any]										= (np.transpose(__lowerCamelCase					)).tolist()
  										UpperCAmelCase__			:     str										= matop.transpose(__lowerCamelCase   ,       return_map=__lowerCamelCase					)
  										assert theo == act
  
  
  
  
  
  
  
style_context: 
  
  
  
  
  
  
  from typing import TYPE_CHECKING
  
  from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available
  
  
  SCREAMING_SNAKE_CASE__		:       Any   							=							{"""configuration_dinat""": ["""DINAT_PRETRAINED_CONFIG_ARCHIVE_MAP""", """DinatConfig"""]}
  
  
  try:
        if not is_torch_available():
              raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
        pass
  else:
        SCREAMING_SNAKE_CASE__		:       str   							=							[
            """DINAT_PRETRAINED_MODEL_ARCHIVE_LIST""",
            """DinatForImageClassification""",
            """DinatModel""",
            """DinatPreTrainedModel""",
            """DinatBackbone""",
        ]
  
  if TYPE_CHECKING:
        from .configuration_dinat import DINAT_PRETRAINED_CONFIG_ARCHIVE_MAP, DinatConfig
  
        try:
              if not is_torch_available():
                    raise OptionalDependencyNotAvailable()
        except OptionalDependencyNotAvailable:
              pass
        else:
              from .modeling_dinat import (
                  DINAT_PRETRAINED_MODEL_ARCHIVE_LIST,
                  DinatBackbone,
                  DinatForImageClassification,
                  DinatModel,
                  DinatPreTrainedModel,
              )
  
  else:
        import sys
  
        SCREAMING_SNAKE_CASE__		:       Dict   							=							_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)
  
  
  
  
  
  
  