'''simple docstring'''

from ...configuration_utils import PretrainedConfig
from ...utils import logging


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

_A      :				List[Any] 				=   {
    # pcqm4mv1 now deprecated
    '''graphormer-base''': '''https://huggingface.co/clefourrier/graphormer-base-pcqm4mv2/resolve/main/config.json''',
    # See all Graphormer models at https://huggingface.co/models?filter=graphormer
}







class     _lowercase					(    UpperCAmelCase__      ):


 '''simple docstring'''






 _SCREAMING_SNAKE_CASE					:	Optional[int]				     = """graphormer"""
 _SCREAMING_SNAKE_CASE					:	str				     = ["""past_key_values"""]
 def __init__(				self       :     List[str]				,	SCREAMING_SNAKE_CASE__       :     int = 1				,	SCREAMING_SNAKE_CASE__       :     int = 5_12 * 9				,	SCREAMING_SNAKE_CASE__       :     int = 5_12 * 3				,	SCREAMING_SNAKE_CASE__       :     int = 5_12				,	SCREAMING_SNAKE_CASE__       :     int = 5_12				,	SCREAMING_SNAKE_CASE__       :     int = 5_12				,	SCREAMING_SNAKE_CASE__       :     int = 1_28				,	SCREAMING_SNAKE_CASE__       :     int = 5				,	SCREAMING_SNAKE_CASE__       :     int = 10_24				,	SCREAMING_SNAKE_CASE__       :     str = "multi_hop"				,	SCREAMING_SNAKE_CASE__       :     int = 5_12				,	SCREAMING_SNAKE_CASE__       :     bool = False				,	SCREAMING_SNAKE_CASE__       :     int = 12				,	SCREAMING_SNAKE_CASE__       :     int = 7_68				,	SCREAMING_SNAKE_CASE__       :     int = 7_68				,	SCREAMING_SNAKE_CASE__       :     int = 32				,	SCREAMING_SNAKE_CASE__       :     float = 0.1				,	SCREAMING_SNAKE_CASE__       :     float = 0.1				,	SCREAMING_SNAKE_CASE__       :     float = 0.0				,	SCREAMING_SNAKE_CASE__       :     bool = False				,	SCREAMING_SNAKE_CASE__       :     bool = False				,	SCREAMING_SNAKE_CASE__       :     bool = False				,	SCREAMING_SNAKE_CASE__       :     str = "gelu"				,	SCREAMING_SNAKE_CASE__       :     float = None				,	SCREAMING_SNAKE_CASE__       :     bool = False				,	SCREAMING_SNAKE_CASE__       :     int = 0				,	SCREAMING_SNAKE_CASE__       :     bool = False				,	SCREAMING_SNAKE_CASE__       :     float = 0.0				,	SCREAMING_SNAKE_CASE__       :     int = 8				,	SCREAMING_SNAKE_CASE__       :     int = None				,	SCREAMING_SNAKE_CASE__       :     int = None				,	SCREAMING_SNAKE_CASE__       :     bool = True				,	SCREAMING_SNAKE_CASE__       :     bool = True				,	SCREAMING_SNAKE_CASE__       :     Any=0				,	SCREAMING_SNAKE_CASE__       :     List[str]=1				,	SCREAMING_SNAKE_CASE__       :     str=2				,	**SCREAMING_SNAKE_CASE__       :     Union[str, Any]				,	)  ->   List[Any]:
  __lowerCAmelCase    							=						num_classes
  __lowerCAmelCase    							=						num_atoms
  __lowerCAmelCase    							=						num_in_degree
  __lowerCAmelCase    							=						num_out_degree
  __lowerCAmelCase    							=						num_edges
  __lowerCAmelCase    							=						num_spatial
  __lowerCAmelCase    							=						num_edge_dis
  __lowerCAmelCase    							=						edge_type
  __lowerCAmelCase    							=						multi_hop_max_dist
  __lowerCAmelCase    							=						spatial_pos_max
  __lowerCAmelCase    							=						max_nodes
  __lowerCAmelCase    							=						num_hidden_layers
  __lowerCAmelCase    							=						embedding_dim
  __lowerCAmelCase    							=						embedding_dim
  __lowerCAmelCase    							=						ffn_embedding_dim
  __lowerCAmelCase    							=						num_attention_heads
  __lowerCAmelCase    							=						dropout
  __lowerCAmelCase    							=						attention_dropout
  __lowerCAmelCase    							=						layerdrop
  __lowerCAmelCase    							=						encoder_normalize_before
  __lowerCAmelCase    							=						pre_layernorm
  __lowerCAmelCase    							=						apply_graphormer_init
  __lowerCAmelCase    							=						activation_fn
  __lowerCAmelCase    							=						embed_scale
  __lowerCAmelCase    							=						freeze_embeddings
  __lowerCAmelCase    							=						num_trans_layers_to_freeze
  __lowerCAmelCase    							=						share_input_output_embed
  __lowerCAmelCase    							=						traceable
  __lowerCAmelCase    							=						q_noise
  __lowerCAmelCase    							=						qn_block_size

  # These parameters are here for future extensions
  # atm, the model only supports self attention
  __lowerCAmelCase    							=						kdim
  __lowerCAmelCase    							=						vdim
  __lowerCAmelCase    							=						self_attention
  __lowerCAmelCase    							=						bias

  super().__init__(
      pad_token_id=SCREAMING_SNAKE_CASE__				,	bos_token_id=SCREAMING_SNAKE_CASE__				,	eos_token_id=SCREAMING_SNAKE_CASE__				,	**SCREAMING_SNAKE_CASE__				,	)







'''simple docstring'''

def 					UpperCamelCase_						( snake_case_	:	int				) ->					int:






 '''simple docstring'''

 if number != int(snake_case_				):
  raise ValueError("""factorial() only accepts integral values"""				)
 if number < 0:
  raise ValueError("""factorial() not defined for negative values"""				)
 __lowerCAmelCase    							=						1
 for i in range(1						,		number + 1				):
  value *= i
 return value







def 					UpperCamelCase_						( snake_case_	:	int				) ->					int:






 '''simple docstring'''

 if not isinstance(snake_case_						,		snake_case_				):
  raise ValueError("""factorial() only accepts integral values"""				)
 if n < 0:
  raise ValueError("""factorial() not defined for negative values"""				)
 return 1 if n == 0 or n == 1 else n * factorial(n - 1				)


if __name__ == "__main__":
 import doctest

 doctest.testmod()

 _A      :				List[Any] 				=    int(input('''Enter a positive integer: ''').strip() or 0)
 print(f'factorial{n} is {factorial(n)}')






