
"""simple docstring"""


from typing import Optional, Tuple, Union

import tensorflow as tf

from ...activations_tf import ACTaFN
from ...modeling_tf_outputs import (
    TFBaseModelOutputWithNoAttention,
    TFBaseModelOutputWithPoolingAndNoAttention,
    TFImageClassifierOutputWithNoAttention,
)
from ...modeling_tf_utils import TFPreTrainedModel, TFSequenceClassificationLoss, keras_serializable, unpack_inputs
from ...tf_utils import shape_list
from ...utils import add_code_sample_docstrings, add_start_docstrings, add_start_docstrings_to_model_forward, logging
from .configuration_resnet import ResNetConfig


lowerCAmelCase								=						logging.get_logger(__name__)

# General docstring
lowerCAmelCase								=						"""ResNetConfig"""

# Base docstring
lowerCAmelCase								=						"""microsoft/resnet-50"""
lowerCAmelCase								=						[1, 20_48, 7, 7]

# Image classification docstring
lowerCAmelCase								=						"""microsoft/resnet-50"""
lowerCAmelCase								=						"""tiger cat"""

lowerCAmelCase								=						[
    """microsoft/resnet-50""",
    # See all resnet models at https://huggingface.co/models?filter=resnet
]

class    A_     (					tf.keras.layers.Layer       ):



							"""simple docstring"""






							def __init__(  self  :Union[str, Any]					,							lowerCamelCase_  :int					,							lowerCamelCase_  :int = 3					,							lowerCamelCase_  :int = 1					,							lowerCamelCase_  :str = "relu"					,							**lowerCamelCase_  :List[str]	):





										"""simple docstring"""

										super().__init__(**lowerCamelCase_	)
										lowerCamelCase__     :					Dict		=kernel_size // 2
										lowerCamelCase__     :					Dict		=tf.keras.layers.ConvaD(
										    lowerCamelCase_					,							kernel_size=lowerCamelCase_					,							strides=lowerCamelCase_					,							padding='valid'					,							use_bias=lowerCamelCase_					,							name='convolution'	)
										# Use same default momentum and epsilon as PyTorch equivalent
										lowerCamelCase__     :					str		=tf.keras.layers.BatchNormalization(epsilon=1e-5					,							momentum=0.9					,							name='normalization'	)
										lowerCamelCase__     :					int		=ACTaFN[activation] if activation is not None else tf.keras.layers.Activation('linear'	)





							def 				UpperCAmelCase__							(  self  :Dict					,							lowerCamelCase_  :tf.Tensor	):





										"""simple docstring"""

										lowerCamelCase__     :					List[str]		=(self.pad_value, self.pad_value)
										lowerCamelCase__     :					Union[str, Any]		=tf.pad(lowerCamelCase_					,							[(0, 0), height_pad, width_pad, (0, 0)]	)
										lowerCamelCase__     :					int		=self.conv(lowerCamelCase_	)
										return hidden_state





							def 				UpperCAmelCase__							(  self  :Tuple					,							lowerCamelCase_  :tf.Tensor					,							lowerCamelCase_  :bool = False	):





										"""simple docstring"""

										lowerCamelCase__     :					Optional[Any]		=self.convolution(lowerCamelCase_	)
										lowerCamelCase__     :					Tuple		=self.normalization(lowerCamelCase_					,							training=lowerCamelCase_	)
										lowerCamelCase__     :					Dict		=self.activation(lowerCamelCase_	)
										return hidden_state






class    A_     (					tf.keras.layers.Layer       ):



							"""simple docstring"""






							def __init__(  self  :List[str]					,							lowerCamelCase_  :ResNetConfig					,							**lowerCamelCase_  :Any	):





										"""simple docstring"""

										super().__init__(**lowerCamelCase_	)
										lowerCamelCase__     :					List[Any]		=TFResNetConvLayer(
										    config.embedding_size					,							kernel_size=7					,							stride=2					,							activation=config.hidden_act					,							name='embedder'					,							)
										lowerCamelCase__     :					Union[str, Any]		=tf.keras.layers.MaxPoolaD(pool_size=3					,							strides=2					,							padding='valid'					,							name='pooler'	)
										lowerCamelCase__     :					Any		=config.num_channels





							def 				UpperCAmelCase__							(  self  :List[str]					,							lowerCamelCase_  :tf.Tensor					,							lowerCamelCase_  :bool = False	):





										"""simple docstring"""

										lowerCamelCase__	,    lowerCamelCase__	,    lowerCamelCase__	,    lowerCamelCase__     :					str		=shape_list(lowerCamelCase_	)
										if tf.executing_eagerly() and num_channels != self.num_channels:
													raise ValueError(
													    'Make sure that the channel dimension of the pixel values match with the one set in the configuration.'	)
										lowerCamelCase__     :					Any		=pixel_values
										lowerCamelCase__     :					List[str]		=self.embedder(lowerCamelCase_	)
										lowerCamelCase__     :					List[Any]		=tf.pad(lowerCamelCase_					,							[[0, 0], [1, 1], [1, 1], [0, 0]]	)
										lowerCamelCase__     :					Optional[int]		=self.pooler(lowerCamelCase_	)
										return hidden_state






class    A_     (					tf.keras.layers.Layer       ):



							"""simple docstring"""






							def __init__(  self  :Union[str, Any]					,							lowerCamelCase_  :int					,							lowerCamelCase_  :int = 2					,							**lowerCamelCase_  :int	):





										"""simple docstring"""

										super().__init__(**lowerCamelCase_	)
										lowerCamelCase__     :					Any		=tf.keras.layers.ConvaD(
										    lowerCamelCase_					,							kernel_size=1					,							strides=lowerCamelCase_					,							use_bias=lowerCamelCase_					,							name='convolution'	)
										# Use same default momentum and epsilon as PyTorch equivalent
										lowerCamelCase__     :					Dict		=tf.keras.layers.BatchNormalization(epsilon=1e-5					,							momentum=0.9					,							name='normalization'	)





							def 				UpperCAmelCase__							(  self  :Optional[int]					,							lowerCamelCase_  :tf.Tensor					,							lowerCamelCase_  :bool = False	):





										"""simple docstring"""

										lowerCamelCase__     :					int		=x
										lowerCamelCase__     :					Optional[int]		=self.convolution(lowerCamelCase_	)
										lowerCamelCase__     :					Union[str, Any]		=self.normalization(lowerCamelCase_					,							training=lowerCamelCase_	)
										return hidden_state






class    A_     (					tf.keras.layers.Layer       ):



							"""simple docstring"""






							def __init__(  self  :Dict					,							lowerCamelCase_  :int					,							lowerCamelCase_  :int					,							lowerCamelCase_  :int = 1					,							lowerCamelCase_  :str = "relu"					,							**lowerCamelCase_  :Union[str, Any]	):





										"""simple docstring"""

										super().__init__(**lowerCamelCase_	)
										lowerCamelCase__     :					Any		=in_channels != out_channels or stride != 1
										lowerCamelCase__     :					Optional[int]		=TFResNetConvLayer(lowerCamelCase_					,							stride=lowerCamelCase_					,							name='layer.0'	)
										lowerCamelCase__     :					Optional[int]		=TFResNetConvLayer(lowerCamelCase_					,							activation=lowerCamelCase_					,							name='layer.1'	)
										lowerCamelCase__     :					Optional[int]		=(
										    TFResNetShortCut(lowerCamelCase_					,							stride=lowerCamelCase_					,							name='shortcut'	)
										    if should_apply_shortcut
										    else tf.keras.layers.Activation('linear'					,							name='shortcut'	)
										)
										lowerCamelCase__     :					Tuple		=ACTaFN[activation]





							def 				UpperCAmelCase__							(  self  :Dict					,							lowerCamelCase_  :tf.Tensor					,							lowerCamelCase_  :bool = False	):





										"""simple docstring"""

										lowerCamelCase__     :					Union[str, Any]		=hidden_state
										lowerCamelCase__     :					int		=self.conva(lowerCamelCase_					,							training=lowerCamelCase_	)
										lowerCamelCase__     :					Tuple		=self.conva(lowerCamelCase_					,							training=lowerCamelCase_	)
										lowerCamelCase__     :					Union[str, Any]		=self.shortcut(lowerCamelCase_					,							training=lowerCamelCase_	)
										hidden_state += residual
										lowerCamelCase__     :					Any		=self.activation(lowerCamelCase_	)
										return hidden_state






class    A_     (					tf.keras.layers.Layer       ):



							"""simple docstring"""






							def __init__(  self  :Tuple					,							lowerCamelCase_  :int					,							lowerCamelCase_  :int					,							lowerCamelCase_  :int = 1					,							lowerCamelCase_  :str = "relu"					,							lowerCamelCase_  :int = 4					,							**lowerCamelCase_  :List[Any]					,							):





										"""simple docstring"""

										super().__init__(**lowerCamelCase_	)
										lowerCamelCase__     :					int		=in_channels != out_channels or stride != 1
										lowerCamelCase__     :					List[str]		=out_channels // reduction
										lowerCamelCase__     :					Optional[Any]		=TFResNetConvLayer(lowerCamelCase_					,							kernel_size=1					,							name='layer.0'	)
										lowerCamelCase__     :					List[Any]		=TFResNetConvLayer(lowerCamelCase_					,							stride=lowerCamelCase_					,							name='layer.1'	)
										lowerCamelCase__     :					int		=TFResNetConvLayer(lowerCamelCase_					,							kernel_size=1					,							activation=lowerCamelCase_					,							name='layer.2'	)
										lowerCamelCase__     :					int		=(
										    TFResNetShortCut(lowerCamelCase_					,							stride=lowerCamelCase_					,							name='shortcut'	)
										    if should_apply_shortcut
										    else tf.keras.layers.Activation('linear'					,							name='shortcut'	)
										)
										lowerCamelCase__     :					List[Any]		=ACTaFN[activation]





							def 				UpperCAmelCase__							(  self  :Optional[Any]					,							lowerCamelCase_  :tf.Tensor					,							lowerCamelCase_  :bool = False	):





										"""simple docstring"""

										lowerCamelCase__     :					str		=hidden_state
										lowerCamelCase__     :					List[str]		=self.conva(lowerCamelCase_					,							training=lowerCamelCase_	)
										lowerCamelCase__     :					int		=self.conva(lowerCamelCase_					,							training=lowerCamelCase_	)
										lowerCamelCase__     :					Tuple		=self.conva(lowerCamelCase_					,							training=lowerCamelCase_	)
										lowerCamelCase__     :					Dict		=self.shortcut(lowerCamelCase_					,							training=lowerCamelCase_	)
										hidden_state += residual
										lowerCamelCase__     :					Tuple		=self.activation(lowerCamelCase_	)
										return hidden_state






class    A_     (					tf.keras.layers.Layer       ):



							"""simple docstring"""






							def __init__(  self  :Any					,							lowerCamelCase_  :ResNetConfig					,							lowerCamelCase_  :int					,							lowerCamelCase_  :int					,							lowerCamelCase_  :int = 2					,							lowerCamelCase_  :int = 2					,							**lowerCamelCase_  :Union[str, Any]	):





										"""simple docstring"""

										super().__init__(**lowerCamelCase_	)

										lowerCamelCase__     :					Dict		=TFResNetBottleNeckLayer if config.layer_type == 'bottleneck' else TFResNetBasicLayer

										lowerCamelCase__     :					Tuple		=[layer(lowerCamelCase_					,							lowerCamelCase_					,							stride=lowerCamelCase_					,							activation=config.hidden_act					,							name='layers.0'	)]
										layers += [
										    layer(lowerCamelCase_					,							lowerCamelCase_					,							activation=config.hidden_act					,							name=f"""layers.{i + 1}"""	)
										    for i in range(depth - 1	)
										]
										lowerCamelCase__     :					Optional[int]		=layers





							def 				UpperCAmelCase__							(  self  :Optional[int]					,							lowerCamelCase_  :tf.Tensor					,							lowerCamelCase_  :bool = False	):





										"""simple docstring"""

										for layer in self.stage_layers:
													lowerCamelCase__     :					Tuple		=layer(lowerCamelCase_					,							training=lowerCamelCase_	)
										return hidden_state






class    A_     (					tf.keras.layers.Layer       ):



							"""simple docstring"""






							def __init__(  self  :List[str]					,							lowerCamelCase_  :ResNetConfig					,							**lowerCamelCase_  :Optional[int]	):





										"""simple docstring"""

										super().__init__(**lowerCamelCase_	)
										# based on `downsample_in_first_stage` the first layer of the first stage may or may not downsample the input
										lowerCamelCase__     :					Any		=[
										    TFResNetStage(
										        lowerCamelCase_					,							config.embedding_size					,							config.hidden_sizes[0]					,							stride=2 if config.downsample_in_first_stage else 1					,							depth=config.depths[0]					,							name='stages.0'					,							)
										]
										for i, (in_channels, out_channels, depth) in enumerate(
										    zip(config.hidden_sizes					,							config.hidden_sizes[1:]					,							config.depths[1:]	)	):
													self.stages.append(TFResNetStage(lowerCamelCase_					,							lowerCamelCase_					,							lowerCamelCase_					,							depth=lowerCamelCase_					,							name=f"""stages.{i + 1}"""	)	)





							def 				UpperCAmelCase__							(  self  :List[str]					,							lowerCamelCase_  :tf.Tensor					,							lowerCamelCase_  :bool = False					,							lowerCamelCase_  :bool = True					,							lowerCamelCase_  :bool = False					,							):





										"""simple docstring"""

										lowerCamelCase__     :					Tuple		=() if output_hidden_states else None

										for stage_module in self.stages:
													if output_hidden_states:
																lowerCamelCase__     :					Dict		=hidden_states + (hidden_state,)

													lowerCamelCase__     :					Optional[int]		=stage_module(lowerCamelCase_					,							training=lowerCamelCase_	)

										if output_hidden_states:
													lowerCamelCase__     :					Optional[int]		=hidden_states + (hidden_state,)

										if not return_dict:
													return tuple(v for v in [hidden_state, hidden_states] if v is not None	)

										return TFBaseModelOutputWithNoAttention(last_hidden_state=lowerCamelCase_					,							hidden_states=lowerCamelCase_	)






class    A_     (					A__       ):



							"""simple docstring"""






							SCREAMING_SNAKE_CASE_     				=       ResNetConfig
							SCREAMING_SNAKE_CASE_     				=       """resnet"""
							SCREAMING_SNAKE_CASE_     				=       """pixel_values"""





							@property
							def 				UpperCAmelCase__							(  self  :int	):





										"""simple docstring"""

										return {"pixel_values": tf.TensorSpec(shape=(None, self.config.num_channels, 224, 224)					,							dtype=tf.floataa	)}






lowerCAmelCase								=						r"""
    This model is a TensorFlow
    [tf.keras.layers.Layer](https://www.tensorflow.org/api_docs/python/tf/keras/layers/Layer) sub-class. Use it as a
    regular TensorFlow Module and refer to the TensorFlow documentation for all matter related to general usage and
    behavior.

    Parameters:
        config ([`ResNetConfig`]): Model configuration class with all the parameters of the model.
            Initializing with a config file does not load the weights associated with the model, only the
            configuration. Check out the [`~TFPreTrainedModel.from_pretrained`] method to load the model weights.
"""


lowerCAmelCase								=						r"""
    Args:
        pixel_values (`tf.Tensor` of shape `(batch_size, num_channels, height, width)`):
            Pixel values. Pixel values can be obtained using [`AutoImageProcessor`]. See
            [`ConvNextImageProcessor.__call__`] for details.

        output_hidden_states (`bool`, *optional*):
            Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
            more detail.
        return_dict (`bool`, *optional*):
            Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple.
"""

@keras_serializable
class    A_     (					tf.keras.layers.Layer       ):



							"""simple docstring"""






							SCREAMING_SNAKE_CASE_     				=       ResNetConfig





							def __init__(  self  :Any					,							lowerCamelCase_  :ResNetConfig					,							**lowerCamelCase_  :List[str]	):





										"""simple docstring"""

										super().__init__(**lowerCamelCase_	)
										lowerCamelCase__     :					List[Any]		=config
										lowerCamelCase__     :					Tuple		=TFResNetEmbeddings(lowerCamelCase_					,							name='embedder'	)
										lowerCamelCase__     :					Tuple		=TFResNetEncoder(lowerCamelCase_					,							name='encoder'	)
										lowerCamelCase__     :					List[Any]		=tf.keras.layers.GlobalAveragePoolingaD(keepdims=lowerCamelCase_	)





							@unpack_inputs
							def 				UpperCAmelCase__							(  self  :Union[str, Any]					,							lowerCamelCase_  :tf.Tensor					,							lowerCamelCase_  :Optional[bool] = None					,							lowerCamelCase_  :Optional[bool] = None					,							lowerCamelCase_  :bool = False					,							):





										"""simple docstring"""

										lowerCamelCase__     :					List[Any]		=(
										    output_hidden_states if output_hidden_states is not None else self.config.output_hidden_states
										)
										lowerCamelCase__     :					Tuple		=return_dict if return_dict is not None else self.config.use_return_dict

										# TF 2.0 image layers can't use NCHW format when running on CPU.
										# We transpose to NHWC format and then transpose back after the full forward pass.
										# (batch_size, num_channels, height, width) -> (batch_size, height, width, num_channels)
										lowerCamelCase__     :					Optional[Any]		=tf.transpose(lowerCamelCase_					,							perm=[0, 2, 3, 1]	)
										lowerCamelCase__     :					Tuple		=self.embedder(lowerCamelCase_					,							training=lowerCamelCase_	)

										lowerCamelCase__     :					Any		=self.encoder(
										    lowerCamelCase_					,							output_hidden_states=lowerCamelCase_					,							return_dict=lowerCamelCase_					,							training=lowerCamelCase_	)

										lowerCamelCase__     :					int		=encoder_outputs[0]

										lowerCamelCase__     :					Dict		=self.pooler(lowerCamelCase_	)

										# Transpose all the outputs to the NCHW format
										# (batch_size, height, width, num_channels) -> (batch_size, num_channels, height, width)
										lowerCamelCase__     :					List[str]		=tf.transpose(lowerCamelCase_					,							(0, 3, 1, 2)	)
										lowerCamelCase__     :					Any		=tf.transpose(lowerCamelCase_					,							(0, 3, 1, 2)	)
										lowerCamelCase__     :					Optional[Any]		=()
										for hidden_state in encoder_outputs[1:]:
													lowerCamelCase__     :					Optional[Any]		=hidden_states + tuple(tf.transpose(lowerCamelCase_					,							(0, 3, 1, 2)	) for h in hidden_state	)

										if not return_dict:
													return (last_hidden_state, pooled_output) + hidden_states

										lowerCamelCase__     :					List[str]		=hidden_states if output_hidden_states else None

										return TFBaseModelOutputWithPoolingAndNoAttention(
										    last_hidden_state=lowerCamelCase_					,							pooler_output=lowerCamelCase_					,							hidden_states=lowerCamelCase_					,							)






@add_start_docstrings(
    """The bare ResNet model outputting raw features without any specific head on top."""				, A__				, )
class    A_     (					A__       ):



							"""simple docstring"""






							def __init__(  self  :Optional[Any]					,							lowerCamelCase_  :ResNetConfig					,							**lowerCamelCase_  :int	):





										"""simple docstring"""

										super().__init__(lowerCamelCase_					,							**lowerCamelCase_	)
										lowerCamelCase__     :					Dict		=TFResNetMainLayer(config=lowerCamelCase_					,							name='resnet'	)





							@add_start_docstrings_to_model_forward(lowerCamelCase_	)
							@add_code_sample_docstrings(
							    checkpoint=_CHECKPOINT_FOR_DOC					,							output_type=lowerCamelCase_					,							config_class=_CONFIG_FOR_DOC					,							modality='vision'					,							expected_output=_EXPECTED_OUTPUT_SHAPE					,							)
							@unpack_inputs
							def 				UpperCAmelCase__							(  self  :Union[str, Any]					,							lowerCamelCase_  :tf.Tensor					,							lowerCamelCase_  :Optional[bool] = None					,							lowerCamelCase_  :Optional[bool] = None					,							lowerCamelCase_  :bool = False					,							):





										"""simple docstring"""

										lowerCamelCase__     :					Tuple		=(
										    output_hidden_states if output_hidden_states is not None else self.config.output_hidden_states
										)
										lowerCamelCase__     :					List[Any]		=return_dict if return_dict is not None else self.config.use_return_dict

										lowerCamelCase__     :					Any		=self.resnet(
										    pixel_values=lowerCamelCase_					,							output_hidden_states=lowerCamelCase_					,							return_dict=lowerCamelCase_					,							training=lowerCamelCase_					,							)
										return resnet_outputs






@add_start_docstrings(
    """
    ResNet Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
    ImageNet.
    """				, A__				, )
class    A_     (					A__				, A__       ):



							"""simple docstring"""






							def __init__(  self  :Optional[Any]					,							lowerCamelCase_  :ResNetConfig					,							**lowerCamelCase_  :Optional[Any]	):





										"""simple docstring"""

										super().__init__(lowerCamelCase_					,							**lowerCamelCase_	)
										lowerCamelCase__     :					Union[str, Any]		=config.num_labels
										lowerCamelCase__     :					Optional[Any]		=TFResNetMainLayer(lowerCamelCase_					,							name='resnet'	)
										# classification head
										lowerCamelCase__     :					Dict		=(
										    tf.keras.layers.Dense(config.num_labels					,							name='classifier.1'	)
										    if config.num_labels > 0
										    else tf.keras.layers.Activation('linear'					,							name='classifier.1'	)
										)





							def 				UpperCAmelCase__							(  self  :List[str]					,							lowerCamelCase_  :tf.Tensor	):





										"""simple docstring"""

										lowerCamelCase__     :					int		=tf.keras.layers.Flatten()(lowerCamelCase_	)
										lowerCamelCase__     :					List[str]		=self.classifier_layer(lowerCamelCase_	)
										return logits





							@add_start_docstrings_to_model_forward(lowerCamelCase_	)
							@add_code_sample_docstrings(
							    checkpoint=_IMAGE_CLASS_CHECKPOINT					,							output_type=lowerCamelCase_					,							config_class=_CONFIG_FOR_DOC					,							expected_output=_IMAGE_CLASS_EXPECTED_OUTPUT					,							)
							@unpack_inputs
							def 				UpperCAmelCase__							(  self  :Any					,							lowerCamelCase_  :tf.Tensor = None					,							lowerCamelCase_  :tf.Tensor = None					,							lowerCamelCase_  :bool = None					,							lowerCamelCase_  :bool = None					,							lowerCamelCase_  :bool = False					,							):





										"""simple docstring"""

										lowerCamelCase__     :					Optional[int]		=return_dict if return_dict is not None else self.config.use_return_dict

										lowerCamelCase__     :					List[Any]		=self.resnet(
										    lowerCamelCase_					,							output_hidden_states=lowerCamelCase_					,							return_dict=lowerCamelCase_					,							training=lowerCamelCase_	)

										lowerCamelCase__     :					List[str]		=outputs.pooler_output if return_dict else outputs[1]

										lowerCamelCase__     :					Dict		=self.classifier(lowerCamelCase_	)

										lowerCamelCase__     :					int		=None if labels is None else self.hf_compute_loss(lowerCamelCase_					,							lowerCamelCase_	)

										if not return_dict:
													lowerCamelCase__     :					List[Any]		=(logits,) + outputs[2:]
													return (loss,) + output if loss is not None else output

										return TFImageClassifierOutputWithNoAttention(loss=lowerCamelCase_					,							logits=lowerCamelCase_					,							hidden_states=outputs.hidden_states	)

"""simple docstring"""


from math import cos, sin






def        lowerCAmelCase_       (		snake_case_		:      float      )       ->list[list[float]]:
			lowerCamelCase__     :					List[Any]		=float(snake_case_      )
			return [[scaling_factor * int(x == y      ) for x in range(2      )] for y in range(2      )]






def        lowerCAmelCase_       (		snake_case_		:      float      )       ->list[list[float]]:
			lowerCamelCase__	,    lowerCamelCase__     :					Union[str, Any]		=cos(snake_case_      ), sin(snake_case_      )
			return [[c, -s], [s, c]]






def        lowerCAmelCase_       (		snake_case_		:      float      )       ->list[list[float]]:
			lowerCamelCase__	,    lowerCamelCase__     :					Optional[Any]		=cos(snake_case_      ), sin(snake_case_      )
			lowerCamelCase__     :					Dict		=c * s
			return [[c * c, cs], [cs, s * s]]






def        lowerCAmelCase_       (		snake_case_		:      float      )       ->list[list[float]]:
			lowerCamelCase__	,    lowerCamelCase__     :					str		=cos(snake_case_      ), sin(snake_case_      )
			lowerCamelCase__     :					Dict		=c * s
			return [[2 * c - 1, 2 * cs], [2 * cs, 2 * s - 1]]


print(f"""    {scaling(5) = }""")
print(f"""  {rotation(45) = }""")
print(f"""{projection(45) = }""")

print(f"""{reflection(45) = }""")