






from typing import Optional

import torch
import torch.utils.checkpoint
from torch import Tensor, nn
from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss

from ...activations import ACTaFN
from ...file_utils import add_code_sample_docstrings, add_start_docstrings, add_start_docstrings_to_model_forward
from ...modeling_outputs import (
    BaseModelOutputWithNoAttention,
    BaseModelOutputWithPoolingAndNoAttention,
    ImageClassifierOutputWithNoAttention,
)
from ...modeling_utils import PreTrainedModel
from ...utils import logging
from .configuration_regnet import RegNetConfig


lowerCamelCase     :							Optional[Any]    =logging.get_logger(__name__)

# General docstring
lowerCamelCase     :							Optional[Any]    ='''RegNetConfig'''

# Base docstring
lowerCamelCase     :							List[str]    ='''facebook/regnet-y-040'''
lowerCamelCase     :							Any    =[1, 1088, 7, 7]

# Image classification docstring
lowerCamelCase     :							Any    ='''facebook/regnet-y-040'''
lowerCamelCase     :							Dict    ='''tabby, tabby cat'''

lowerCamelCase     :							List[Any]    =[
    '''facebook/regnet-y-040''',
    # See all regnet models at https://huggingface.co/models?filter=regnet
]





class       __a  (   nn.Module	):







 def __init__(		self :       Dict							,       SCREAMING_SNAKE_CASE :       int							,       SCREAMING_SNAKE_CASE :       int							,       SCREAMING_SNAKE_CASE :       int = 3							,       SCREAMING_SNAKE_CASE :       int = 1							,       SCREAMING_SNAKE_CASE :       int = 1							,       SCREAMING_SNAKE_CASE :       Optional[str] = "relu"							,       ):


      '''simple docstring'''






      super().__init__()
      UpperCamelCase__      :       str	    =  nn.Convad(
          SCREAMING_SNAKE_CASE							,       SCREAMING_SNAKE_CASE							,       kernel_size=SCREAMING_SNAKE_CASE							,       stride=SCREAMING_SNAKE_CASE							,       padding=kernel_size // 2							,       groups=SCREAMING_SNAKE_CASE							,       bias=SCREAMING_SNAKE_CASE							,       )
      UpperCamelCase__      :       Optional[Any]	    =  nn.BatchNormad(SCREAMING_SNAKE_CASE						)
      UpperCamelCase__      :       Optional[int]	    =  ACTaFN[activation] if activation is not None else nn.Identity()







 def  __lowercase (		self :       Optional[int]							,       SCREAMING_SNAKE_CASE :       Any						):


      '''simple docstring'''






      UpperCamelCase__      :       Optional[Any]	    =  self.convolution(SCREAMING_SNAKE_CASE						)
      UpperCamelCase__      :       Union[str, Any]	    =  self.normalization(SCREAMING_SNAKE_CASE						)
      UpperCamelCase__      :       Optional[int]	    =  self.activation(SCREAMING_SNAKE_CASE						)
      return hidden_state







class       __a  (   nn.Module	):







 def __init__(		self :       Dict							,       SCREAMING_SNAKE_CASE :       RegNetConfig						):


      '''simple docstring'''






      super().__init__()
      UpperCamelCase__      :       Union[str, Any]	    =  RegNetConvLayer(
          config.num_channels							,       config.embedding_size							,       kernel_size=3							,       stride=2							,       activation=config.hidden_act						)
      UpperCamelCase__      :       Union[str, Any]	    =  config.num_channels







 def  __lowercase (		self :       int							,       SCREAMING_SNAKE_CASE :       Optional[int]						):


      '''simple docstring'''






      UpperCamelCase__      :       Any	    =  pixel_values.shape[1]
      if 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."						)
      UpperCamelCase__      :       Dict	    =  self.embedder(SCREAMING_SNAKE_CASE						)
      return hidden_state







class       __a  (   nn.Module	):







 def __init__(		self :       Optional[Any]							,       SCREAMING_SNAKE_CASE :       int							,       SCREAMING_SNAKE_CASE :       int							,       SCREAMING_SNAKE_CASE :       int = 2						):


      '''simple docstring'''






      super().__init__()
      UpperCamelCase__      :       List[Any]	    =  nn.Convad(SCREAMING_SNAKE_CASE							,       SCREAMING_SNAKE_CASE							,       kernel_size=1							,       stride=SCREAMING_SNAKE_CASE							,       bias=SCREAMING_SNAKE_CASE						)
      UpperCamelCase__      :       str	    =  nn.BatchNormad(SCREAMING_SNAKE_CASE						)







 def  __lowercase (		self :       Any							,       SCREAMING_SNAKE_CASE :       Tensor						):


      '''simple docstring'''






      UpperCamelCase__      :       Optional[Any]	    =  self.convolution(SCREAMING_SNAKE_CASE						)
      UpperCamelCase__      :       Union[str, Any]	    =  self.normalization(SCREAMING_SNAKE_CASE						)
      return hidden_state







class       __a  (   nn.Module	):







 def __init__(		self :       int							,       SCREAMING_SNAKE_CASE :       int							,       SCREAMING_SNAKE_CASE :       int						):


      '''simple docstring'''






      super().__init__()

      UpperCamelCase__      :       Any	    =  nn.AdaptiveAvgPoolad((1, 1)						)
      UpperCamelCase__      :       Dict	    =  nn.Sequential(
          nn.Convad(SCREAMING_SNAKE_CASE							,       SCREAMING_SNAKE_CASE							,       kernel_size=1						)							,       nn.ReLU()							,       nn.Convad(SCREAMING_SNAKE_CASE							,       SCREAMING_SNAKE_CASE							,       kernel_size=1						)							,       nn.Sigmoid()							,       )







 def  __lowercase (		self :       Optional[Any]							,       SCREAMING_SNAKE_CASE :       Tuple						):


      '''simple docstring'''






      UpperCamelCase__      :       Union[str, Any]	    =  self.pooler(SCREAMING_SNAKE_CASE						)
      UpperCamelCase__      :       Any	    =  self.attention(SCREAMING_SNAKE_CASE						)
      UpperCamelCase__      :       str	    =  hidden_state * attention
      return hidden_state







class       __a  (   nn.Module	):







 def __init__(		self :       Optional[Any]							,       SCREAMING_SNAKE_CASE :       RegNetConfig							,       SCREAMING_SNAKE_CASE :       int							,       SCREAMING_SNAKE_CASE :       int							,       SCREAMING_SNAKE_CASE :       int = 1						):


      '''simple docstring'''






      super().__init__()
      UpperCamelCase__      :       Tuple	    =  in_channels != out_channels or stride != 1
      UpperCamelCase__      :       str	    =  max(1							,       out_channels // config.groups_width						)
      UpperCamelCase__      :       Union[str, Any]	    =  (
          RegNetShortCut(SCREAMING_SNAKE_CASE							,       SCREAMING_SNAKE_CASE							,       stride=SCREAMING_SNAKE_CASE						) if should_apply_shortcut else nn.Identity()
      )
      UpperCamelCase__      :       str	    =  nn.Sequential(
          RegNetConvLayer(SCREAMING_SNAKE_CASE							,       SCREAMING_SNAKE_CASE							,       kernel_size=1							,       activation=config.hidden_act						)							,       RegNetConvLayer(SCREAMING_SNAKE_CASE							,       SCREAMING_SNAKE_CASE							,       stride=SCREAMING_SNAKE_CASE							,       groups=SCREAMING_SNAKE_CASE							,       activation=config.hidden_act						)							,       RegNetConvLayer(SCREAMING_SNAKE_CASE							,       SCREAMING_SNAKE_CASE							,       kernel_size=1							,       activation=SCREAMING_SNAKE_CASE						)							,       )
      UpperCamelCase__      :       List[str]	    =  ACTaFN[config.hidden_act]







 def  __lowercase (		self :       Dict							,       SCREAMING_SNAKE_CASE :       Optional[Any]						):


      '''simple docstring'''






      UpperCamelCase__      :       Optional[int]	    =  hidden_state
      UpperCamelCase__      :       List[str]	    =  self.layer(SCREAMING_SNAKE_CASE						)
      UpperCamelCase__      :       List[Any]	    =  self.shortcut(SCREAMING_SNAKE_CASE						)
      hidden_state += residual
      UpperCamelCase__      :       Dict	    =  self.activation(SCREAMING_SNAKE_CASE						)
      return hidden_state







class       __a  (   nn.Module	):







 def __init__(		self :       int							,       SCREAMING_SNAKE_CASE :       RegNetConfig							,       SCREAMING_SNAKE_CASE :       int							,       SCREAMING_SNAKE_CASE :       int							,       SCREAMING_SNAKE_CASE :       int = 1						):


      '''simple docstring'''






      super().__init__()
      UpperCamelCase__      :       Tuple	    =  in_channels != out_channels or stride != 1
      UpperCamelCase__      :       List[Any]	    =  max(1							,       out_channels // config.groups_width						)
      UpperCamelCase__      :       Optional[int]	    =  (
          RegNetShortCut(SCREAMING_SNAKE_CASE							,       SCREAMING_SNAKE_CASE							,       stride=SCREAMING_SNAKE_CASE						) if should_apply_shortcut else nn.Identity()
      )
      UpperCamelCase__      :       Optional[int]	    =  nn.Sequential(
          RegNetConvLayer(SCREAMING_SNAKE_CASE							,       SCREAMING_SNAKE_CASE							,       kernel_size=1							,       activation=config.hidden_act						)							,       RegNetConvLayer(SCREAMING_SNAKE_CASE							,       SCREAMING_SNAKE_CASE							,       stride=SCREAMING_SNAKE_CASE							,       groups=SCREAMING_SNAKE_CASE							,       activation=config.hidden_act						)							,       RegNetSELayer(SCREAMING_SNAKE_CASE							,       reduced_channels=int(round(in_channels / 4						)						)						)							,       RegNetConvLayer(SCREAMING_SNAKE_CASE							,       SCREAMING_SNAKE_CASE							,       kernel_size=1							,       activation=SCREAMING_SNAKE_CASE						)							,       )
      UpperCamelCase__      :       Optional[Any]	    =  ACTaFN[config.hidden_act]







 def  __lowercase (		self :       Tuple							,       SCREAMING_SNAKE_CASE :       Any						):


      '''simple docstring'''






      UpperCamelCase__      :       Tuple	    =  hidden_state
      UpperCamelCase__      :       List[str]	    =  self.layer(SCREAMING_SNAKE_CASE						)
      UpperCamelCase__      :       Optional[int]	    =  self.shortcut(SCREAMING_SNAKE_CASE						)
      hidden_state += residual
      UpperCamelCase__      :       Tuple	    =  self.activation(SCREAMING_SNAKE_CASE						)
      return hidden_state







class       __a  (   nn.Module	):







 def __init__(		self :       int							,       SCREAMING_SNAKE_CASE :       RegNetConfig							,       SCREAMING_SNAKE_CASE :       int							,       SCREAMING_SNAKE_CASE :       int							,       SCREAMING_SNAKE_CASE :       int = 2							,       SCREAMING_SNAKE_CASE :       int = 2							,       ):


      '''simple docstring'''






      super().__init__()

      UpperCamelCase__      :       Any	    =  RegNetXLayer if config.layer_type == "x" else RegNetYLayer

      UpperCamelCase__      :       Optional[Any]	    =  nn.Sequential(
          # downsampling is done in the first layer with stride of 2
          layer(
              SCREAMING_SNAKE_CASE							,       SCREAMING_SNAKE_CASE							,       SCREAMING_SNAKE_CASE							,       stride=SCREAMING_SNAKE_CASE							,       )							,       *[layer(SCREAMING_SNAKE_CASE							,       SCREAMING_SNAKE_CASE							,       SCREAMING_SNAKE_CASE						) for _ in range(depth - 1						)]							,       )







 def  __lowercase (		self :       List[Any]							,       SCREAMING_SNAKE_CASE :       Optional[Any]						):


      '''simple docstring'''






      UpperCamelCase__      :       int	    =  self.layers(SCREAMING_SNAKE_CASE						)
      return hidden_state







class       __a  (   nn.Module	):







 def __init__(		self :       List[str]							,       SCREAMING_SNAKE_CASE :       RegNetConfig						):


      '''simple docstring'''






      super().__init__()
      UpperCamelCase__      :       Optional[Any]	    =  nn.ModuleList([]						)
      # based on `downsample_in_first_stage`, the first layer of the first stage may or may not downsample the input
      self.stages.append(
          RegNetStage(
              SCREAMING_SNAKE_CASE							,       config.embedding_size							,       config.hidden_sizes[0]							,       stride=2 if config.downsample_in_first_stage else 1							,       depth=config.depths[0]							,       )						)
      UpperCamelCase__      :       str	    =  zip(config.hidden_sizes							,       config.hidden_sizes[1:]						)
      for (in_channels, out_channels), depth in zip(SCREAMING_SNAKE_CASE							,       config.depths[1:]						):
           self.stages.append(RegNetStage(SCREAMING_SNAKE_CASE							,       SCREAMING_SNAKE_CASE							,       SCREAMING_SNAKE_CASE							,       depth=SCREAMING_SNAKE_CASE						)						)







 def  __lowercase (		self :       Dict							,       SCREAMING_SNAKE_CASE :       Tensor							,       SCREAMING_SNAKE_CASE :       bool = False							,       SCREAMING_SNAKE_CASE :       bool = True						):


      '''simple docstring'''






      UpperCamelCase__      :       Tuple	    =  () if output_hidden_states else None

      for stage_module in self.stages:
           if output_hidden_states:
                UpperCamelCase__      :       Union[str, Any]	    =  hidden_states + (hidden_state,)

           UpperCamelCase__      :       Optional[Any]	    =  stage_module(SCREAMING_SNAKE_CASE						)

      if output_hidden_states:
           UpperCamelCase__      :       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 BaseModelOutputWithNoAttention(last_hidden_state=SCREAMING_SNAKE_CASE							,       hidden_states=SCREAMING_SNAKE_CASE						)







class       __a  (   A__	):
 _lowerCAmelCase	:	Optional[Any]				=			RegNetConfig
 _lowerCAmelCase	:	List[str]				=			'''regnet'''
 _lowerCAmelCase	:	int				=			'''pixel_values'''
 _lowerCAmelCase	:	List[str]				=			True







 def  __lowercase (		self :       List[str]							,       SCREAMING_SNAKE_CASE :       List[str]						):


      '''simple docstring'''






      if isinstance(SCREAMING_SNAKE_CASE							,       nn.Convad						):
           nn.init.kaiming_normal_(module.weight							,       mode="fan_out"							,       nonlinearity="relu"						)
      elif isinstance(SCREAMING_SNAKE_CASE							,       (nn.BatchNormad, nn.GroupNorm)						):
           nn.init.constant_(module.weight							,       1						)
           nn.init.constant_(module.bias							,       0						)







 def  __lowercase (		self :       Dict							,       SCREAMING_SNAKE_CASE :       Optional[int]							,       SCREAMING_SNAKE_CASE :       Union[str, Any]=False						):


      '''simple docstring'''






      if isinstance(SCREAMING_SNAKE_CASE							,       SCREAMING_SNAKE_CASE						):
           UpperCamelCase__      :       List[Any]	    =  value







lowerCamelCase     :							Optional[int]    =R'''
    This model is a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) subclass. Use it
    as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
    behavior.

    Parameters:
        config ([`RegNetConfig`]): 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 [`~PreTrainedModel.from_pretrained`] method to load the model weights.
'''

lowerCamelCase     :							List[Any]    =R'''
    Args:
        pixel_values (`torch.FloatTensor` 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 [`~file_utils.ModelOutput`] instead of a plain tuple.
'''





@add_start_docstrings(
    '''The bare RegNet model outputting raw features without any specific head on top.'''	,       A__	,       )
# Copied from transformers.models.resnet.modeling_resnet.ResNetModel with RESNET->REGNET,ResNet->RegNet
class       __a  (   A__	):







 def __init__(		self :       List[Any]							,       SCREAMING_SNAKE_CASE :       Optional[int]						):


      '''simple docstring'''






      super().__init__(SCREAMING_SNAKE_CASE						)
      UpperCamelCase__      :       List[Any]	    =  config
      UpperCamelCase__      :       str	    =  RegNetEmbeddings(SCREAMING_SNAKE_CASE						)
      UpperCamelCase__      :       Optional[Any]	    =  RegNetEncoder(SCREAMING_SNAKE_CASE						)
      UpperCamelCase__      :       Optional[Any]	    =  nn.AdaptiveAvgPoolad((1, 1)						)
      # Initialize weights and apply final processing
      self.post_init()







 @add_start_docstrings_to_model_forward(SCREAMING_SNAKE_CASE						)
 @add_code_sample_docstrings(
     checkpoint=_CHECKPOINT_FOR_DOC							,       output_type=SCREAMING_SNAKE_CASE							,       config_class=_CONFIG_FOR_DOC							,       modality="vision"							,       expected_output=_EXPECTED_OUTPUT_SHAPE							,       )
 def  __lowercase (		self :       str							,       SCREAMING_SNAKE_CASE :       Tensor							,       SCREAMING_SNAKE_CASE :       Optional[bool] = None							,       SCREAMING_SNAKE_CASE :       Optional[bool] = None						):


      '''simple docstring'''






      UpperCamelCase__      :       List[str]	    =  (
          output_hidden_states if output_hidden_states is not None else self.config.output_hidden_states
      )
      UpperCamelCase__      :       Optional[Any]	    =  return_dict if return_dict is not None else self.config.use_return_dict

      UpperCamelCase__      :       Union[str, Any]	    =  self.embedder(SCREAMING_SNAKE_CASE						)

      UpperCamelCase__      :       Any	    =  self.encoder(
          SCREAMING_SNAKE_CASE							,       output_hidden_states=SCREAMING_SNAKE_CASE							,       return_dict=SCREAMING_SNAKE_CASE						)

      UpperCamelCase__      :       List[Any]	    =  encoder_outputs[0]

      UpperCamelCase__      :       Optional[Any]	    =  self.pooler(SCREAMING_SNAKE_CASE						)

      if not return_dict:
           return (last_hidden_state, pooled_output) + encoder_outputs[1:]

      return BaseModelOutputWithPoolingAndNoAttention(
          last_hidden_state=SCREAMING_SNAKE_CASE							,       pooler_output=SCREAMING_SNAKE_CASE							,       hidden_states=encoder_outputs.hidden_states							,       )







@add_start_docstrings(
    '''
    RegNet Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
    ImageNet.
    '''	,       A__	,       )
# Copied from transformers.models.resnet.modeling_resnet.ResNetForImageClassification with RESNET->REGNET,ResNet->RegNet,resnet->regnet
class       __a  (   A__	):







 def __init__(		self :       Optional[Any]							,       SCREAMING_SNAKE_CASE :       int						):


      '''simple docstring'''






      super().__init__(SCREAMING_SNAKE_CASE						)
      UpperCamelCase__      :       Optional[Any]	    =  config.num_labels
      UpperCamelCase__      :       Dict	    =  RegNetModel(SCREAMING_SNAKE_CASE						)
      # classification head
      UpperCamelCase__      :       Dict	    =  nn.Sequential(
          nn.Flatten()							,       nn.Linear(config.hidden_sizes[-1]							,       config.num_labels						) if config.num_labels > 0 else nn.Identity()							,       )
      # initialize weights and apply final processing
      self.post_init()







 @add_start_docstrings_to_model_forward(SCREAMING_SNAKE_CASE						)
 @add_code_sample_docstrings(
     checkpoint=_IMAGE_CLASS_CHECKPOINT							,       output_type=SCREAMING_SNAKE_CASE							,       config_class=_CONFIG_FOR_DOC							,       expected_output=_IMAGE_CLASS_EXPECTED_OUTPUT							,       )
 def  __lowercase (		self :       str							,       SCREAMING_SNAKE_CASE :       Optional[torch.FloatTensor] = None							,       SCREAMING_SNAKE_CASE :       Optional[torch.LongTensor] = None							,       SCREAMING_SNAKE_CASE :       Optional[bool] = None							,       SCREAMING_SNAKE_CASE :       Optional[bool] = None							,       ):


      '''simple docstring'''






      UpperCamelCase__      :       Any	    =  return_dict if return_dict is not None else self.config.use_return_dict

      UpperCamelCase__      :       Tuple	    =  self.regnet(SCREAMING_SNAKE_CASE							,       output_hidden_states=SCREAMING_SNAKE_CASE							,       return_dict=SCREAMING_SNAKE_CASE						)

      UpperCamelCase__      :       Optional[int]	    =  outputs.pooler_output if return_dict else outputs[1]

      UpperCamelCase__      :       Any	    =  self.classifier(SCREAMING_SNAKE_CASE						)

      UpperCamelCase__      :       List[Any]	    =  None

      if labels is not None:
           if self.config.problem_type is None:
                if self.num_labels == 1:
                     UpperCamelCase__      :       List[str]	    =  "regression"
                elif self.num_labels > 1 and (labels.dtype == torch.long or labels.dtype == torch.int):
                     UpperCamelCase__      :       Any	    =  "single_label_classification"
                else:
                     UpperCamelCase__      :       List[str]	    =  "multi_label_classification"
           if self.config.problem_type == "regression":
                UpperCamelCase__      :       Union[str, Any]	    =  MSELoss()
                if self.num_labels == 1:
                     UpperCamelCase__      :       Dict	    =  loss_fct(logits.squeeze()							,       labels.squeeze()						)
                else:
                     UpperCamelCase__      :       str	    =  loss_fct(SCREAMING_SNAKE_CASE							,       SCREAMING_SNAKE_CASE						)
           elif self.config.problem_type == "single_label_classification":
                UpperCamelCase__      :       List[str]	    =  CrossEntropyLoss()
                UpperCamelCase__      :       List[str]	    =  loss_fct(logits.view(-1							,       self.num_labels						)							,       labels.view(-1						)						)
           elif self.config.problem_type == "multi_label_classification":
                UpperCamelCase__      :       Dict	    =  BCEWithLogitsLoss()
                UpperCamelCase__      :       List[str]	    =  loss_fct(SCREAMING_SNAKE_CASE							,       SCREAMING_SNAKE_CASE						)

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

      return ImageClassifierOutputWithNoAttention(loss=SCREAMING_SNAKE_CASE							,       logits=SCREAMING_SNAKE_CASE							,       hidden_states=outputs.hidden_states						)











def 		SCREAMING_SNAKE_CASE							( __lowerCAmelCase ,   __lowerCAmelCase      )			->     Any:
     # "extended trapezoidal rule"
     # int(f) = dx/2 * (f1 + 2f2 + ... + fn)
     UpperCamelCase__      :       int	    =  (boundary[1] - boundary[0]) / steps
     UpperCamelCase__      :       Optional[Any]	    =  boundary[0]
     UpperCamelCase__      :       List[Any]	    =  boundary[1]
     UpperCamelCase__      :       List[Any]	    =  make_points(__lowerCAmelCase ,   __lowerCAmelCase ,   __lowerCAmelCase      )
     UpperCamelCase__      :       int	    =  0.0
     y += (h / 2.0) * f(__lowerCAmelCase      )
     for i in x_i:
          # print(i)
          y += h * f(__lowerCAmelCase      )
     y += (h / 2.0) * f(__lowerCAmelCase      )
     return y







def 		SCREAMING_SNAKE_CASE							( __lowerCAmelCase ,   __lowerCAmelCase ,   __lowerCAmelCase      )			->     List[str]:
     UpperCamelCase__      :       Optional[int]	    =  a + h
     while x < (b - h):
          yield x
          UpperCamelCase__      :       Union[str, Any]	    =  x + h







def 		SCREAMING_SNAKE_CASE							( __lowerCAmelCase      )			->     Any:  # enter your function here
     UpperCamelCase__      :       Dict	    =  (x - 0) * (x - 0)
     return y







def 		SCREAMING_SNAKE_CASE							( )			->     Dict:
     UpperCamelCase__      :       List[Any]	    =  0.0  # Lower bound of integration
     UpperCamelCase__      :       Tuple	    =  1.0  # Upper bound of integration
     UpperCamelCase__      :       Any	    =  1_0.0  # define number of steps or resolution
     UpperCamelCase__      :       List[str]	    =  [a, b]  # define boundary of integration
     UpperCamelCase__      :       Any	    =  method_a(__lowerCAmelCase ,   __lowerCAmelCase      )
     print(f'y = {y}'      )


if __name__ == "__main__":
 main()