


import copy

from ...configuration_utils import PretrainedConfig
from ...utils import logging
from ..auto import CONFIG_MAPPING


_UpperCAmelCase			:  Any     =logging.get_logger(__name__)

_UpperCAmelCase			:  Union[str, Any]     ={
    """ut/deta""": """https://huggingface.co/ut/deta/resolve/main/config.json""",
}







class 				snake_case__(							UpperCAmelCase__							):







						'''simple docstring'''




						SCREAMING_SNAKE_CASE__      :  int					=							"""deta"""
						SCREAMING_SNAKE_CASE__      :  Dict					=							{
						    """hidden_size""": """d_model""",
						    """num_attention_heads""": """encoder_attention_heads""",
						}




						def __init__(				self   ,						__lowercase=None   ,						__lowercase=9_0_0   ,						__lowercase=2_0_4_8   ,						__lowercase=6   ,						__lowercase=2_0_4_8   ,						__lowercase=8   ,						__lowercase=6   ,						__lowercase=1_0_2_4   ,						__lowercase=8   ,						__lowercase=0.0   ,						__lowercase=True   ,						__lowercase="relu"   ,						__lowercase=2_5_6   ,						__lowercase=0.1   ,						__lowercase=0.0   ,						__lowercase=0.0   ,						__lowercase=0.02   ,						__lowercase=1.0   ,						__lowercase=True   ,						__lowercase=False   ,						__lowercase="sine"   ,						__lowercase=5   ,						__lowercase=4   ,						__lowercase=4   ,						__lowercase=True   ,						__lowercase=3_0_0   ,						__lowercase=True   ,						__lowercase=True   ,						__lowercase=1   ,						__lowercase=5   ,						__lowercase=2   ,						__lowercase=1   ,						__lowercase=1   ,						__lowercase=5   ,						__lowercase=2   ,						__lowercase=0.1   ,						__lowercase=0.25   ,						**__lowercase   ,						)					->    Dict:
										if backbone_config is None:
														logger.info('''`backbone_config` is `None`. Initializing the config with the default `ResNet` backbone.'''							)
														lowerCAmelCase_ :      List[str]    				=				CONFIG_MAPPING['''resnet'''](out_features=['''stage2''', '''stage3''', '''stage4''']							)
										else:
														if isinstance(__lowercase   ,						__lowercase							):
																		lowerCAmelCase_ :      Optional[int]    				=				backbone_config.pop('''model_type'''							)
																		lowerCAmelCase_ :      Optional[Any]    				=				CONFIG_MAPPING[backbone_model_type]
																		lowerCAmelCase_ :      Tuple    				=				config_class.from_dict(__lowercase							)

										lowerCAmelCase_ :      str    				=				backbone_config
										lowerCAmelCase_ :      Any    				=				num_queries
										lowerCAmelCase_ :      Optional[int]    				=				max_position_embeddings
										lowerCAmelCase_ :      Any    				=				d_model
										lowerCAmelCase_ :      str    				=				encoder_ffn_dim
										lowerCAmelCase_ :      List[Any]    				=				encoder_layers
										lowerCAmelCase_ :      List[str]    				=				encoder_attention_heads
										lowerCAmelCase_ :      Optional[Any]    				=				decoder_ffn_dim
										lowerCAmelCase_ :      Dict    				=				decoder_layers
										lowerCAmelCase_ :      List[str]    				=				decoder_attention_heads
										lowerCAmelCase_ :      Any    				=				dropout
										lowerCAmelCase_ :      Tuple    				=				attention_dropout
										lowerCAmelCase_ :      Optional[int]    				=				activation_dropout
										lowerCAmelCase_ :      Dict    				=				activation_function
										lowerCAmelCase_ :      str    				=				init_std
										lowerCAmelCase_ :      Optional[Any]    				=				init_xavier_std
										lowerCAmelCase_ :      Optional[Any]    				=				encoder_layerdrop
										lowerCAmelCase_ :      Tuple    				=				auxiliary_loss
										lowerCAmelCase_ :      str    				=				position_embedding_type
										# deformable attributes
										lowerCAmelCase_ :      List[Any]    				=				num_feature_levels
										lowerCAmelCase_ :      List[Any]    				=				encoder_n_points
										lowerCAmelCase_ :      List[str]    				=				decoder_n_points
										lowerCAmelCase_ :      str    				=				two_stage
										lowerCAmelCase_ :      List[str]    				=				two_stage_num_proposals
										lowerCAmelCase_ :      Optional[int]    				=				with_box_refine
										lowerCAmelCase_ :      Tuple    				=				assign_first_stage
										if two_stage is True and with_box_refine is False:
														raise ValueError('''If two_stage is True, with_box_refine must be True.'''							)
										# Hungarian matcher
										lowerCAmelCase_ :      Optional[int]    				=				class_cost
										lowerCAmelCase_ :      Dict    				=				bbox_cost
										lowerCAmelCase_ :      Optional[Any]    				=				giou_cost
										# Loss coefficients
										lowerCAmelCase_ :      str    				=				mask_loss_coefficient
										lowerCAmelCase_ :      Union[str, Any]    				=				dice_loss_coefficient
										lowerCAmelCase_ :      Optional[int]    				=				bbox_loss_coefficient
										lowerCAmelCase_ :      Union[str, Any]    				=				giou_loss_coefficient
										lowerCAmelCase_ :      List[Any]    				=				eos_coefficient
										lowerCAmelCase_ :      Tuple    				=				focal_alpha
										super().__init__(is_encoder_decoder=__lowercase   ,						**__lowercase							)




						@property
						def 						lowercase_ (				self							)					->    int:
										return self.encoder_attention_heads




						@property
						def 						lowercase_ (				self							)					->    int:
										return self.d_model




						def 						lowercase_ (				self							)					->    Union[str, Any]:
										lowerCAmelCase_ :      List[str]    				=				copy.deepcopy(self.__dict__							)
										lowerCAmelCase_ :      Optional[Any]    				=				self.backbone_config.to_dict()
										lowerCAmelCase_ :      List[Any]    				=				self.__class__.model_type
										return output



import re



def 			lowerCAmelCase (		lowerCAmelCase_ )-> bool:
				lowerCAmelCase_ :      Tuple    				=				re.compile(r'''^(\+91[\-\s]?)?[0]?(91)?[789]\d{9}$''' )
				if match := re.search(lowerCAmelCase_ ,   lowerCAmelCase_ ):
								return match.string == phone
				return False


if __name__ == "__main__":
						print(indian_phone_validator("""+918827897895"""))