code: 
  '''simple docstring'''
  
  
  
  
  
  import unittest
  
  from transformers import FunnelConfig, FunnelTokenizer, is_torch_available
  from transformers.models.auto import get_values
  from transformers.testing_utils import require_sentencepiece, require_tokenizers, require_torch, slow, torch_device
  
  from ...test_configuration_common import ConfigTester
  from ...test_modeling_common import ModelTesterMixin, ids_tensor
  from ...test_pipeline_mixin import PipelineTesterMixin
  
  
  if is_torch_available():
       import torch
  
       from transformers import (
           MODEL_FOR_PRETRAINING_MAPPING,
           FunnelBaseModel,
           FunnelForMaskedLM,
           FunnelForMultipleChoice,
           FunnelForPreTraining,
           FunnelForQuestionAnswering,
           FunnelForSequenceClassification,
           FunnelForTokenClassification,
           FunnelModel,
       )
  
  
  
  class  lowerCAmelCase__   :
  
  
  
    '''simple docstring'''
  
  
  
  
  
  
    def __init__(self  : List[Any]	, lowerCAmelCase_  : Optional[Any]	, lowerCAmelCase_  : Tuple=13	, lowerCAmelCase_  : Tuple=7	, lowerCAmelCase_  : Optional[Any]=True	, lowerCAmelCase_  : List[str]=True	, lowerCAmelCase_  : str=True	, lowerCAmelCase_  : str=True	, lowerCAmelCase_  : str=99	, lowerCAmelCase_  : int=[1, 1, 2]	, lowerCAmelCase_  : Any=1	, lowerCAmelCase_  : Union[str, Any]=32	, lowerCAmelCase_  : Dict=4	, lowerCAmelCase_  : List[Any]=8	, lowerCAmelCase_  : int=37	, lowerCAmelCase_  : int="gelu_new"	, lowerCAmelCase_  : Optional[Any]=0.1	, lowerCAmelCase_  : Dict=0.1	, lowerCAmelCase_  : List[Any]=0.0	, lowerCAmelCase_  : List[Any]=5_12	, lowerCAmelCase_  : int=3	, lowerCAmelCase_  : Union[str, Any]=0.02	, lowerCAmelCase_  : Union[str, Any]=3	, lowerCAmelCase_  : Tuple=4	, lowerCAmelCase_  : int=None	, lowerCAmelCase_  : List[str]=False	, )   ->       List[Any]:
          snake_case_						       =							parent
          snake_case_						       =							batch_size
          snake_case_						       =							seq_length
          snake_case_						       =							is_training
          snake_case_						       =							use_input_mask
          snake_case_						       =							use_token_type_ids
          snake_case_						       =							use_labels
          snake_case_						       =							vocab_size
          snake_case_						       =							block_sizes
          snake_case_						       =							num_decoder_layers
          snake_case_						       =							d_model
          snake_case_						       =							n_head
          snake_case_						       =							d_head
          snake_case_						       =							d_inner
          snake_case_						       =							hidden_act
          snake_case_						       =							hidden_dropout
          snake_case_						       =							attention_dropout
          snake_case_						       =							activation_dropout
          snake_case_						       =							max_position_embeddings
          snake_case_						       =							type_vocab_size
          snake_case_						       =							2
          snake_case_						       =							num_labels
          snake_case_						       =							num_choices
          snake_case_						       =							scope
          snake_case_						       =							initializer_std
  
          # Used in the tests to check the size of the first attention layer
          snake_case_						       =							n_head
          # Used in the tests to check the size of the first hidden state
          snake_case_						       =							self.d_model
          # Used in the tests to check the number of output hidden states/attentions
          snake_case_						       =							sum(self.block_sizes    ) + (0 if base else self.num_decoder_layers)
          # FunnelModel adds two hidden layers: input embeddings and the sum of the upsampled encoder hidden state with
          # the last hidden state of the first block (which is the first hidden state of the decoder).
          if not base:
                snake_case_						       =							self.num_hidden_layers + 2
  
    def 		_lowerCamelCase	(self  : Tuple    )   ->       Any:
          snake_case_						       =							ids_tensor([self.batch_size, self.seq_length]	, self.vocab_size    )
  
          snake_case_						       =							None
          if self.use_input_mask:
                snake_case_						       =							ids_tensor([self.batch_size, self.seq_length]	, vocab_size=2    )
  
          snake_case_						       =							None
          if self.use_token_type_ids:
                snake_case_						       =							ids_tensor([self.batch_size, self.seq_length]	, self.type_vocab_size    )
  
          snake_case_						       =							None
          snake_case_						       =							None
          snake_case_						       =							None
          if self.use_labels:
                snake_case_						       =							ids_tensor([self.batch_size]	, self.type_sequence_label_size    )
                snake_case_						       =							ids_tensor([self.batch_size, self.seq_length]	, self.num_labels    )
                snake_case_						       =							ids_tensor([self.batch_size]	, self.num_choices    )
                snake_case_						       =							ids_tensor([self.batch_size, self.seq_length]	, 1    )
  
          snake_case_						       =							self.get_config()
  
          return (
              config,
              input_ids,
              token_type_ids,
              input_mask,
              sequence_labels,
              token_labels,
              choice_labels,
              fake_token_labels,
          )
  
    def 		_lowerCamelCase	(self  : Optional[Any]    )   ->       Tuple:
          return FunnelConfig(
              vocab_size=self.vocab_size	, block_sizes=self.block_sizes	, num_decoder_layers=self.num_decoder_layers	, d_model=self.d_model	, n_head=self.n_head	, d_head=self.d_head	, d_inner=self.d_inner	, hidden_act=self.hidden_act	, hidden_dropout=self.hidden_dropout	, attention_dropout=self.attention_dropout	, activation_dropout=self.activation_dropout	, max_position_embeddings=self.max_position_embeddings	, type_vocab_size=self.type_vocab_size	, initializer_std=self.initializer_std	, )
  
    def 		_lowerCamelCase	(self  : int	, lowerCAmelCase_  : Union[str, Any]	, lowerCAmelCase_  : int	, lowerCAmelCase_  : Dict	, lowerCAmelCase_  : Dict	, lowerCAmelCase_  : Tuple	, lowerCAmelCase_  : Optional[Any]	, lowerCAmelCase_  : Any	, lowerCAmelCase_  : str	, )   ->       List[str]:
          snake_case_						       =							FunnelModel(config=lowerCAmelCase_    )
          model.to(lowerCAmelCase_    )
          model.eval()
          snake_case_						       =							model(lowerCAmelCase_	, attention_mask=lowerCAmelCase_	, token_type_ids=lowerCAmelCase_    )
          snake_case_						       =							model(lowerCAmelCase_	, token_type_ids=lowerCAmelCase_    )
          snake_case_						       =							model(lowerCAmelCase_    )
          self.parent.assertEqual(result.last_hidden_state.shape	, (self.batch_size, self.seq_length, self.d_model)    )
  
          snake_case_						       =							False
          snake_case_						       =							model(lowerCAmelCase_    )
          self.parent.assertEqual(result.last_hidden_state.shape	, (self.batch_size, self.seq_length, self.d_model)    )
  
          snake_case_						       =							False
          snake_case_						       =							model(lowerCAmelCase_    )
          self.parent.assertEqual(result.last_hidden_state.shape	, (self.batch_size, self.seq_length, self.d_model)    )
  
    def 		_lowerCamelCase	(self  : int	, lowerCAmelCase_  : List[Any]	, lowerCAmelCase_  : Optional[Any]	, lowerCAmelCase_  : Any	, lowerCAmelCase_  : Optional[int]	, lowerCAmelCase_  : Optional[Any]	, lowerCAmelCase_  : List[Any]	, lowerCAmelCase_  : List[Any]	, lowerCAmelCase_  : List[Any]	, )   ->       str:
          snake_case_						       =							FunnelBaseModel(config=lowerCAmelCase_    )
          model.to(lowerCAmelCase_    )
          model.eval()
          snake_case_						       =							model(lowerCAmelCase_	, attention_mask=lowerCAmelCase_	, token_type_ids=lowerCAmelCase_    )
          snake_case_						       =							model(lowerCAmelCase_	, token_type_ids=lowerCAmelCase_    )
          snake_case_						       =							model(lowerCAmelCase_    )
          self.parent.assertEqual(result.last_hidden_state.shape	, (self.batch_size, 2, self.d_model)    )
  
          snake_case_						       =							False
          snake_case_						       =							model(lowerCAmelCase_    )
          self.parent.assertEqual(result.last_hidden_state.shape	, (self.batch_size, 3, self.d_model)    )
  
          snake_case_						       =							False
          snake_case_						       =							model(lowerCAmelCase_    )
          self.parent.assertEqual(result.last_hidden_state.shape	, (self.batch_size, 2, self.d_model)    )
  
    def 		_lowerCamelCase	(self  : Optional[Any]	, lowerCAmelCase_  : Any	, lowerCAmelCase_  : List[str]	, lowerCAmelCase_  : Union[str, Any]	, lowerCAmelCase_  : Optional[Any]	, lowerCAmelCase_  : str	, lowerCAmelCase_  : Any	, lowerCAmelCase_  : Optional[int]	, lowerCAmelCase_  : Any	, )   ->       Optional[int]:
          snake_case_						       =							self.num_labels
          snake_case_						       =							FunnelForPreTraining(config=lowerCAmelCase_    )
          model.to(lowerCAmelCase_    )
          model.eval()
          snake_case_						       =							model(lowerCAmelCase_	, attention_mask=lowerCAmelCase_	, token_type_ids=lowerCAmelCase_	, labels=lowerCAmelCase_    )
          self.parent.assertEqual(result.logits.shape	, (self.batch_size, self.seq_length)    )
  
    def 		_lowerCamelCase	(self  : str	, lowerCAmelCase_  : int	, lowerCAmelCase_  : Union[str, Any]	, lowerCAmelCase_  : List[str]	, lowerCAmelCase_  : Union[str, Any]	, lowerCAmelCase_  : List[Any]	, lowerCAmelCase_  : Optional[int]	, lowerCAmelCase_  : Union[str, Any]	, lowerCAmelCase_  : int	, )   ->       str:
          snake_case_						       =							FunnelForMaskedLM(config=lowerCAmelCase_    )
          model.to(lowerCAmelCase_    )
          model.eval()
          snake_case_						       =							model(lowerCAmelCase_	, attention_mask=lowerCAmelCase_	, token_type_ids=lowerCAmelCase_	, labels=lowerCAmelCase_    )
          self.parent.assertEqual(result.logits.shape	, (self.batch_size, self.seq_length, self.vocab_size)    )
  
    def 		_lowerCamelCase	(self  : Optional[int]	, lowerCAmelCase_  : int	, lowerCAmelCase_  : str	, lowerCAmelCase_  : Any	, lowerCAmelCase_  : List[Any]	, lowerCAmelCase_  : Optional[Any]	, lowerCAmelCase_  : Optional[int]	, lowerCAmelCase_  : Any	, lowerCAmelCase_  : List[Any]	, )   ->       Tuple:
          snake_case_						       =							self.num_labels
          snake_case_						       =							FunnelForSequenceClassification(lowerCAmelCase_    )
          model.to(lowerCAmelCase_    )
          model.eval()
          snake_case_						       =							model(lowerCAmelCase_	, attention_mask=lowerCAmelCase_	, token_type_ids=lowerCAmelCase_	, labels=lowerCAmelCase_    )
          self.parent.assertEqual(result.logits.shape	, (self.batch_size, self.num_labels)    )
  
    def 		_lowerCamelCase	(self  : Union[str, Any]	, lowerCAmelCase_  : Union[str, Any]	, lowerCAmelCase_  : List[str]	, lowerCAmelCase_  : Any	, lowerCAmelCase_  : Union[str, Any]	, lowerCAmelCase_  : int	, lowerCAmelCase_  : Tuple	, lowerCAmelCase_  : List[Any]	, lowerCAmelCase_  : str	, )   ->       Union[str, Any]:
          snake_case_						       =							self.num_choices
          snake_case_						       =							FunnelForMultipleChoice(config=lowerCAmelCase_    )
          model.to(lowerCAmelCase_    )
          model.eval()
          snake_case_						       =							input_ids.unsqueeze(1    ).expand(-1	, self.num_choices	, -1    ).contiguous()
          snake_case_						       =							token_type_ids.unsqueeze(1    ).expand(-1	, self.num_choices	, -1    ).contiguous()
          snake_case_						       =							input_mask.unsqueeze(1    ).expand(-1	, self.num_choices	, -1    ).contiguous()
          snake_case_						       =							model(
              lowerCAmelCase_	, attention_mask=lowerCAmelCase_	, token_type_ids=lowerCAmelCase_	, labels=lowerCAmelCase_	, )
          self.parent.assertEqual(result.logits.shape	, (self.batch_size, self.num_choices)    )
  
    def 		_lowerCamelCase	(self  : int	, lowerCAmelCase_  : Tuple	, lowerCAmelCase_  : List[Any]	, lowerCAmelCase_  : Tuple	, lowerCAmelCase_  : int	, lowerCAmelCase_  : str	, lowerCAmelCase_  : Any	, lowerCAmelCase_  : str	, lowerCAmelCase_  : Any	, )   ->       str:
          snake_case_						       =							self.num_labels
          snake_case_						       =							FunnelForTokenClassification(config=lowerCAmelCase_    )
          model.to(lowerCAmelCase_    )
          model.eval()
          snake_case_						       =							model(lowerCAmelCase_	, attention_mask=lowerCAmelCase_	, token_type_ids=lowerCAmelCase_	, labels=lowerCAmelCase_    )
          self.parent.assertEqual(result.logits.shape	, (self.batch_size, self.seq_length, self.num_labels)    )
  
    def 		_lowerCamelCase	(self  : Optional[int]	, lowerCAmelCase_  : str	, lowerCAmelCase_  : Union[str, Any]	, lowerCAmelCase_  : str	, lowerCAmelCase_  : Dict	, lowerCAmelCase_  : Any	, lowerCAmelCase_  : List[str]	, lowerCAmelCase_  : Union[str, Any]	, lowerCAmelCase_  : List[Any]	, )   ->       Dict:
          snake_case_						       =							FunnelForQuestionAnswering(config=lowerCAmelCase_    )
          model.to(lowerCAmelCase_    )
          model.eval()
          snake_case_						       =							model(
              lowerCAmelCase_	, attention_mask=lowerCAmelCase_	, token_type_ids=lowerCAmelCase_	, start_positions=lowerCAmelCase_	, end_positions=lowerCAmelCase_	, )
          self.parent.assertEqual(result.start_logits.shape	, (self.batch_size, self.seq_length)    )
          self.parent.assertEqual(result.end_logits.shape	, (self.batch_size, self.seq_length)    )
  
  
    def 		_lowerCamelCase	(self  : Union[str, Any]    )   ->       Tuple:
          snake_case_						       =							self.prepare_config_and_inputs()
          (
              (
              snake_case_
          )       ,	(
              snake_case_
          )       ,	(
              snake_case_
          )       ,	(
              snake_case_
          )       ,	(
              snake_case_
          )       ,	(
              snake_case_
          )       ,	(
              snake_case_
          )       ,	(
              snake_case_
          )       ,	
          )						       =							config_and_inputs
          snake_case_						       =							{"input_ids": input_ids, "token_type_ids": token_type_ids, "attention_mask": input_mask}
          return config, inputs_dict
  
  
  
  @require_torch
  class  lowerCAmelCase__   (       UpperCamelCase					,							UpperCamelCase					,							unittest.TestCase       ):
  
  
  
    '''simple docstring'''
  
  
  
  
  
  
    _UpperCamelCase						= False
    _UpperCamelCase						= False
    _UpperCamelCase						= (
        (
            FunnelModel,
            FunnelForMaskedLM,
            FunnelForPreTraining,
            FunnelForQuestionAnswering,
            FunnelForTokenClassification,
        )
        if is_torch_available()
        else ()
    )
    _UpperCamelCase						= (
        {
            'feature-extraction': (FunnelBaseModel, FunnelModel),
            'fill-mask': FunnelForMaskedLM,
            'question-answering': FunnelForQuestionAnswering,
            'text-classification': FunnelForSequenceClassification,
            'token-classification': FunnelForTokenClassification,
            'zero-shot': FunnelForSequenceClassification,
        }
        if is_torch_available()
        else {}
    )
  
    def 		_lowerCamelCase	(self  : List[str]	, lowerCAmelCase_  : Optional[int]	, lowerCAmelCase_  : Dict	, lowerCAmelCase_  : Union[str, Any]=False    )   ->       int:
          snake_case_						       =							super()._prepare_for_class(lowerCAmelCase_	, lowerCAmelCase_	, return_labels=lowerCAmelCase_    )
  
          if return_labels:
                if model_class in get_values(lowerCAmelCase_    ):
                      snake_case_						       =							torch.zeros(
                          (self.model_tester.batch_size, self.model_tester.seq_length)	, dtype=torch.long	, device=lowerCAmelCase_    )
          return inputs_dict
  
    def 		_lowerCamelCase	(self  : Optional[Any]    )   ->       Optional[Any]:
          snake_case_						       =							FunnelModelTester(self    )
          snake_case_						       =							ConfigTester(self	, config_class=lowerCAmelCase_    )
  
    def 		_lowerCamelCase	(self  : Tuple    )   ->       str:
          self.config_tester.run_common_tests()
  
    def 		_lowerCamelCase	(self  : Any    )   ->       Optional[int]:
          snake_case_						       =							self.model_tester.prepare_config_and_inputs()
          self.model_tester.create_and_check_model(*lowerCAmelCase_    )
  
    def 		_lowerCamelCase	(self  : Any    )   ->       Optional[int]:
          snake_case_						       =							self.model_tester.prepare_config_and_inputs()
          self.model_tester.create_and_check_for_pretraining(*lowerCAmelCase_    )
  
    def 		_lowerCamelCase	(self  : Optional[int]    )   ->       Dict:
          snake_case_						       =							self.model_tester.prepare_config_and_inputs()
          self.model_tester.create_and_check_for_masked_lm(*lowerCAmelCase_    )
  
    def 		_lowerCamelCase	(self  : Union[str, Any]    )   ->       List[str]:
          snake_case_						       =							self.model_tester.prepare_config_and_inputs()
          self.model_tester.create_and_check_for_token_classification(*lowerCAmelCase_    )
  
    def 		_lowerCamelCase	(self  : Union[str, Any]    )   ->       Tuple:
          snake_case_						       =							self.model_tester.prepare_config_and_inputs()
          self.model_tester.create_and_check_for_question_answering(*lowerCAmelCase_    )
  
  
    def 		_lowerCamelCase	(self  : Optional[Any]	, lowerCAmelCase_  : Dict    )   ->       str:
          if hasattr(lowerCAmelCase_	, "weight"    ) and module.weight is not None:
                module.weight.data.fill_(3    )
          if hasattr(lowerCAmelCase_	, "bias"    ) and module.bias is not None:
                module.bias.data.fill_(3    )
  
          for param in ["r_w_bias", "r_r_bias", "r_kernel", "r_s_bias", "seg_embed"]:
                if hasattr(lowerCAmelCase_	, lowerCAmelCase_    ) and getattr(lowerCAmelCase_	, lowerCAmelCase_    ) is not None:
                      snake_case_						       =							getattr(lowerCAmelCase_	, lowerCAmelCase_    )
                      weight.data.fill_(3    )
  
  
  
  @require_torch
  class  lowerCAmelCase__   (       UpperCamelCase					,							unittest.TestCase       ):
  
  
  
    '''simple docstring'''
  
  
  
  
  
  
    _UpperCamelCase						= False
    _UpperCamelCase						= False
    _UpperCamelCase						= (
        (FunnelBaseModel, FunnelForMultipleChoice, FunnelForSequenceClassification) if is_torch_available() else ()
    )
  
    def 		_lowerCamelCase	(self  : Dict    )   ->       Tuple:
          snake_case_						       =							FunnelModelTester(self	, base=lowerCAmelCase_    )
          snake_case_						       =							ConfigTester(self	, config_class=lowerCAmelCase_    )
  
    def 		_lowerCamelCase	(self  : Tuple    )   ->       str:
          self.config_tester.run_common_tests()
  
    def 		_lowerCamelCase	(self  : Dict    )   ->       Any:
          snake_case_						       =							self.model_tester.prepare_config_and_inputs()
          self.model_tester.create_and_check_base_model(*lowerCAmelCase_    )
  
    def 		_lowerCamelCase	(self  : Optional[Any]    )   ->       List[str]:
          snake_case_						       =							self.model_tester.prepare_config_and_inputs()
          self.model_tester.create_and_check_for_sequence_classification(*lowerCAmelCase_    )
  
    def 		_lowerCamelCase	(self  : Dict    )   ->       List[Any]:
          snake_case_						       =							self.model_tester.prepare_config_and_inputs()
          self.model_tester.create_and_check_for_multiple_choice(*lowerCAmelCase_    )
  
    def 		_lowerCamelCase	(self  : Optional[int]    )   ->       List[str]:
          snake_case_       ,	snake_case_						       =							self.model_tester.prepare_config_and_inputs_for_common()
          snake_case_						       =							True
  
          for model_class in self.all_model_classes:
                if model_class.__name__ == "FunnelBaseModel":
                      continue
                snake_case_						       =							model_class(lowerCAmelCase_    )
                model.to(lowerCAmelCase_    )
                model.train()
                snake_case_						       =							self._prepare_for_class(lowerCAmelCase_	, lowerCAmelCase_	, return_labels=lowerCAmelCase_    )
                snake_case_						       =							model(**lowerCAmelCase_    ).loss
                loss.backward()
  
  
    def 		_lowerCamelCase	(self  : Dict	, lowerCAmelCase_  : str    )   ->       Optional[int]:
          if hasattr(lowerCAmelCase_	, "weight"    ) and module.weight is not None:
                module.weight.data.fill_(3    )
          if hasattr(lowerCAmelCase_	, "bias"    ) and module.bias is not None:
                module.bias.data.fill_(3    )
  
          for param in ["r_w_bias", "r_r_bias", "r_kernel", "r_s_bias", "seg_embed"]:
                if hasattr(lowerCAmelCase_	, lowerCAmelCase_    ) and getattr(lowerCAmelCase_	, lowerCAmelCase_    ) is not None:
                      snake_case_						       =							getattr(lowerCAmelCase_	, lowerCAmelCase_    )
                      weight.data.fill_(3    )
  
  
  
  @require_torch
  @require_sentencepiece
  @require_tokenizers
  class  lowerCAmelCase__   (       unittest.TestCase       ):
  
  
  
    '''simple docstring'''
  
  
  
  
  
  
    def 		_lowerCamelCase	(self  : int    )   ->       Any:
          snake_case_						       =							13
          snake_case_						       =							7
          snake_case_						       =							torch.arange(0	, batch_size * sequence_length    ).long().reshape(lowerCAmelCase_	, lowerCAmelCase_    )
          snake_case_						       =							[0, 1, 2, 3, 4, 5, 6, 4, 1, 3, 5, 0, 1]
          snake_case_						       =							torch.tensor([[2] + [0] * a + [1] * (sequence_length - a - 1) for a in lengths]    )
  
          snake_case_						       =							FunnelModel.from_pretrained("sgugger/funnel-random-tiny"    )
          snake_case_						       =							model(lowerCAmelCase_	, token_type_ids=lowerCAmelCase_    )[0].abs()
  
          snake_case_						       =							torch.tensor(2_344.8_352    )
          snake_case_						       =							torch.tensor(0.8_052    )
          self.assertTrue(torch.allclose(output.sum()	, lowerCAmelCase_	, atol=1E-4    )    )
          self.assertTrue(torch.allclose(output.mean()	, lowerCAmelCase_	, atol=1E-4    )    )
  
          snake_case_						       =							torch.tensor([[1] * 7, [1] * 4 + [0] * 3] * 6 + [[0, 1, 1, 0, 0, 1, 1]]    )
          snake_case_						       =							model(lowerCAmelCase_	, attention_mask=lowerCAmelCase_	, token_type_ids=lowerCAmelCase_    )[0].abs()
  
          snake_case_						       =							torch.tensor(2_343.8_425    )
          snake_case_						       =							torch.tensor(0.8_049    )
          self.assertTrue(torch.allclose(output.sum()	, lowerCAmelCase_	, atol=1E-4    )    )
          self.assertTrue(torch.allclose(output.mean()	, lowerCAmelCase_	, atol=1E-4    )    )
  
  
    @slow
    def 		_lowerCamelCase	(self  : List[str]    )   ->       str:
          snake_case_						       =							FunnelTokenizer.from_pretrained("huggingface/funnel-small"    )
          snake_case_						       =							FunnelModel.from_pretrained("huggingface/funnel-small"    )
          snake_case_						       =							tokenizer("Hello! I am the Funnel Transformer model."	, return_tensors="pt"    )
          snake_case_						       =							model(**lowerCAmelCase_    )[0]
  
          snake_case_						       =							torch.tensor(235.7_246    )
          snake_case_						       =							torch.tensor(0.0_256    )
          self.assertTrue(torch.allclose(output.sum()	, lowerCAmelCase_	, atol=1E-4    )    )
          self.assertTrue(torch.allclose(output.mean()	, lowerCAmelCase_	, atol=1E-4    )    )
  
  
style_context: 
  '''simple docstring'''
  
  
  
  
  
  import json
  import os
  import pickle
  import subprocess
  from hashlib import mda
  from pathlib import Path
  from tempfile import gettempdir
  from textwrap import dedent
  from types import CodeType, FunctionType
  from unittest import TestCase
  from unittest.mock import patch
  
  import pytest
  from multiprocess import Pool
  from packaging import version
  
  import datasets
  from datasets.fingerprint import Hasher, fingerprint_transform
  from datasets.table import InMemoryTable
  
  from .utils import (
      require_regex,
      require_spacy,
      require_spacy_model,
      require_tiktoken,
      require_torch,
      require_transformers,
  )
  
  
  
  class  lowerCAmelCase__   :
  
  
  
    '''simple docstring'''
  
  
  
  
  
  
    def __init__(self  : int	, lowerCAmelCase_  : Optional[Any]    )   ->       Tuple:
          snake_case_						       =							foo
  
  
    def __call__(self  : List[Any]    )   ->       Optional[int]:
          return self.foo
  
  
  
  class  lowerCAmelCase__   (       datasets.Dataset       ):
  
  
  
    '''simple docstring'''
  
  
  
  
  
  
    @fingerprint_transform(inplace=lowerCAmelCase_    )
    def 		_lowerCamelCase	(self  : Tuple	, lowerCAmelCase_  : Any	, *lowerCAmelCase_  : Union[str, Any]	, **lowerCAmelCase_  : Any    )   ->       str:
          return DatasetChild(self.data	, fingerprint=lowerCAmelCase_    )
  
  
    @fingerprint_transform(inplace=lowerCAmelCase_    )
    def 		_lowerCamelCase	(self  : str	, lowerCAmelCase_  : Optional[Any]	, *lowerCAmelCase_  : List[Any]	, **lowerCAmelCase_  : Any    )   ->       List[str]:
          return DatasetChild(self.data	, fingerprint=lowerCAmelCase_    )
  
  
  
  class  lowerCAmelCase__   :
  
  
  
    '''simple docstring'''
  
  
  
  
  
  
    def __init__(self  : int	, lowerCAmelCase_  : List[str]    )   ->       Dict:
          snake_case_						       =							callable
  
    def __call__(self  : List[str]	, *lowerCAmelCase_  : Any	, **lowerCAmelCase_  : Tuple    )   ->       Dict:
          if self.callable is not None:
                return self.callable(*lowerCAmelCase_	, **lowerCAmelCase_    )
  
  
    def __getstate__(self  : List[str]    )   ->       Tuple:
          raise pickle.PicklingError()
  
  
  
  class  lowerCAmelCase__   (       UpperCamelCase       ):
  
  
  
    '''simple docstring'''
  
  
  
  
  
  
    @require_transformers
    @pytest.mark.integration
    def 		_lowerCamelCase	(self  : str    )   ->       str:
          from transformers import AutoTokenizer
  
          def encode(lowerCAmelCase_  : str    ):
                return tokenizer(lowerCAmelCase_    )
  
          # TODO: add hash consistency tests across sessions
          snake_case_						       =							AutoTokenizer.from_pretrained("bert-base-uncased"    )
          snake_case_						       =							mda(datasets.utils.py_utils.dumps(lowerCAmelCase_    )    ).hexdigest()
          snake_case_						       =							mda(datasets.utils.py_utils.dumps(lambda lowerCAmelCase_    : tokenizer(lowerCAmelCase_    )    )    ).hexdigest()
          snake_case_						       =							mda(datasets.utils.py_utils.dumps(lowerCAmelCase_    )    ).hexdigest()
          snake_case_						       =							AutoTokenizer.from_pretrained("bert-base-cased"    )
          snake_case_						       =							mda(datasets.utils.py_utils.dumps(lowerCAmelCase_    )    ).hexdigest()
          snake_case_						       =							mda(datasets.utils.py_utils.dumps(lambda lowerCAmelCase_    : tokenizer(lowerCAmelCase_    )    )    ).hexdigest()
          snake_case_						       =							mda(datasets.utils.py_utils.dumps(lowerCAmelCase_    )    ).hexdigest()
          snake_case_						       =							AutoTokenizer.from_pretrained("bert-base-uncased"    )
          snake_case_						       =							mda(datasets.utils.py_utils.dumps(lowerCAmelCase_    )    ).hexdigest()
          snake_case_						       =							mda(datasets.utils.py_utils.dumps(lambda lowerCAmelCase_    : tokenizer(lowerCAmelCase_    )    )    ).hexdigest()
          snake_case_						       =							mda(datasets.utils.py_utils.dumps(lowerCAmelCase_    )    ).hexdigest()
          self.assertEqual(lowerCAmelCase_	, lowerCAmelCase_    )
          self.assertNotEqual(lowerCAmelCase_	, lowerCAmelCase_    )
          self.assertEqual(lowerCAmelCase_	, lowerCAmelCase_    )
          self.assertNotEqual(lowerCAmelCase_	, lowerCAmelCase_    )
          self.assertEqual(lowerCAmelCase_	, lowerCAmelCase_    )
          self.assertNotEqual(lowerCAmelCase_	, lowerCAmelCase_    )
  
    @require_transformers
    @pytest.mark.integration
    def 		_lowerCamelCase	(self  : Optional[Any]    )   ->       Optional[int]:
          from transformers import AutoTokenizer
  
          snake_case_						       =							AutoTokenizer.from_pretrained("gpt2"    )
          snake_case_						       =							mda(datasets.utils.py_utils.dumps(lowerCAmelCase_    )    ).hexdigest()
          tokenizer("Hello world !"    )  # call once to change the tokenizer's cache
          snake_case_						       =							mda(datasets.utils.py_utils.dumps(lowerCAmelCase_    )    ).hexdigest()
          self.assertEqual(lowerCAmelCase_	, lowerCAmelCase_    )
  
  
    @require_regex
    def 		_lowerCamelCase	(self  : Union[str, Any]    )   ->       Optional[int]:
          import regex
  
          snake_case_						       =							regex.Regex("foo"    )
          snake_case_						       =							mda(datasets.utils.py_utils.dumps(lowerCAmelCase_    )    ).hexdigest()
          snake_case_						       =							regex.Regex("bar"    )
          snake_case_						       =							mda(datasets.utils.py_utils.dumps(lowerCAmelCase_    )    ).hexdigest()
          snake_case_						       =							regex.Regex("foo"    )
          snake_case_						       =							mda(datasets.utils.py_utils.dumps(lowerCAmelCase_    )    ).hexdigest()
          self.assertEqual(lowerCAmelCase_	, lowerCAmelCase_    )
          self.assertNotEqual(lowerCAmelCase_	, lowerCAmelCase_    )
  
  
  
  class  lowerCAmelCase__   (       UpperCamelCase       ):
  
  
  
    '''simple docstring'''
  
  
  
  
  
  
    def 		_lowerCamelCase	(self  : Dict    )   ->       Optional[Any]:
          def func():
                return foo
  
          snake_case_						       =							[0]
          snake_case_						       =							mda(datasets.utils.py_utils.dumps(lowerCAmelCase_    )    ).hexdigest()
          snake_case_						       =							[1]
          snake_case_						       =							mda(datasets.utils.py_utils.dumps(lowerCAmelCase_    )    ).hexdigest()
          snake_case_						       =							[0]
          snake_case_						       =							mda(datasets.utils.py_utils.dumps(lowerCAmelCase_    )    ).hexdigest()
          self.assertEqual(lowerCAmelCase_	, lowerCAmelCase_    )
          self.assertNotEqual(lowerCAmelCase_	, lowerCAmelCase_    )
  
    def 		_lowerCamelCase	(self  : str    )   ->       Tuple:
          def func():
                pass
  
          snake_case_						       =							mda(datasets.utils.py_utils.dumps(lowerCAmelCase_    )    ).hexdigest()
  
          def func():
                pass
  
          snake_case_						       =							mda(datasets.utils.py_utils.dumps(lowerCAmelCase_    )    ).hexdigest()
          self.assertEqual(lowerCAmelCase_	, lowerCAmelCase_    )
  
    def 		_lowerCamelCase	(self  : List[Any]    )   ->       Union[str, Any]:
          snake_case_						       =							mda(datasets.utils.py_utils.dumps(Foo([0]    )    )    ).hexdigest()
          snake_case_						       =							mda(datasets.utils.py_utils.dumps(Foo([1]    )    )    ).hexdigest()
          snake_case_						       =							mda(datasets.utils.py_utils.dumps(Foo([0]    )    )    ).hexdigest()
          self.assertEqual(lowerCAmelCase_	, lowerCAmelCase_    )
          self.assertNotEqual(lowerCAmelCase_	, lowerCAmelCase_    )
  
    def 		_lowerCamelCase	(self  : Union[str, Any]    )   ->       int:
          snake_case_						       =							mda(datasets.utils.py_utils.dumps(Foo([0]    ).__call__    )    ).hexdigest()
          snake_case_						       =							mda(datasets.utils.py_utils.dumps(Foo([1]    ).__call__    )    ).hexdigest()
          snake_case_						       =							mda(datasets.utils.py_utils.dumps(Foo([0]    ).__call__    )    ).hexdigest()
          self.assertEqual(lowerCAmelCase_	, lowerCAmelCase_    )
          self.assertNotEqual(lowerCAmelCase_	, lowerCAmelCase_    )
  
    def 		_lowerCamelCase	(self  : int    )   ->       Optional[Any]:
          snake_case_						       =							(
              "co_argcount",
              "co_kwonlyargcount",
              "co_nlocals",
              "co_stacksize",
              "co_flags",
              "co_code",
              "co_consts",
              "co_names",
              "co_varnames",
              "co_filename",
              "co_name",
              "co_firstlineno",
              "co_lnotab",
              "co_freevars",
              "co_cellvars",
          )
  
          def _create_code_pyaa(*lowerCAmelCase_  : Any    ):
                if hasattr(args[-3]	, "encode"    ):
                      snake_case_						       =							list(lowerCAmelCase_    )
                      snake_case_						       =							args[-3].encode()  # co_lnotab
                      snake_case_						       =							args[-10].encode()  # co_code
                if hasattr(lowerCAmelCase_	, "co_posonlyargcount"    ):
                      if len(lowerCAmelCase_    ) == 16:
                            return CodeType(*lowerCAmelCase_    )
                      elif len(lowerCAmelCase_    ) == 15:
                            return CodeType(args[0]	, 0	, *args[1:]    )
                      return CodeType(args[0]	, 0	, 0	, *args[1:]    )
                elif hasattr(lowerCAmelCase_	, "co_kwonlyargcount"    ):
                      if len(lowerCAmelCase_    ) == 16:
                            return CodeType(args[0]	, *args[2:]    )
                      elif len(lowerCAmelCase_    ) == 15:
                            return CodeType(*lowerCAmelCase_    )
                      return CodeType(args[0]	, 0	, *args[1:]    )
                if len(lowerCAmelCase_    ) == 16:
                      return CodeType(args[0]	, *args[3:]    )
                elif len(lowerCAmelCase_    ) == 15:
                      return CodeType(args[0]	, *args[2:]    )
                return CodeType(*lowerCAmelCase_    )
  
          def create_ipython_func(lowerCAmelCase_  : Tuple	, lowerCAmelCase_  : Any    ):
                def func():
                      return returned_obj
  
                snake_case_						       =							func.__code__
                # Use _create_code from dill in order to make it work for different python versions
                if datasets.config.PY_VERSION < version.parse("3.8"    ):
                      snake_case_						       =							_create_code_pyaa(
                          *[getattr(lowerCAmelCase_	, lowerCAmelCase_    ) if k != "co_filename" else co_filename for k in code_args_pyaa]    )
                else:
                      snake_case_						       =							code.replace(co_filename=lowerCAmelCase_    )
                return FunctionType(lowerCAmelCase_	, func.__globals__	, func.__name__	, func.__defaults__	, func.__closure__    )
  
          snake_case_       ,	snake_case_						       =							"<ipython-input-2-e0383a102aae>", [0]
          snake_case_						       =							mda(datasets.utils.py_utils.dumps(create_ipython_func(lowerCAmelCase_	, lowerCAmelCase_    )    )    ).hexdigest()
          snake_case_       ,	snake_case_						       =							"<ipython-input-2-e0383a102aae>", [1]
          snake_case_						       =							mda(datasets.utils.py_utils.dumps(create_ipython_func(lowerCAmelCase_	, lowerCAmelCase_    )    )    ).hexdigest()
          snake_case_       ,	snake_case_						       =							"<ipython-input-5-713f6613acf3>", [0]
          snake_case_						       =							mda(datasets.utils.py_utils.dumps(create_ipython_func(lowerCAmelCase_	, lowerCAmelCase_    )    )    ).hexdigest()
          self.assertEqual(lowerCAmelCase_	, lowerCAmelCase_    )
          self.assertNotEqual(lowerCAmelCase_	, lowerCAmelCase_    )
  
          snake_case_       ,	snake_case_						       =							os.path.join(gettempdir()	, "ipykernel_12345"	, "321456789.py"    ), [0]
          snake_case_						       =							mda(datasets.utils.py_utils.dumps(create_ipython_func(lowerCAmelCase_	, lowerCAmelCase_    )    )    ).hexdigest()
          snake_case_       ,	snake_case_						       =							os.path.join(gettempdir()	, "ipykernel_12345"	, "321456789.py"    ), [1]
          snake_case_						       =							mda(datasets.utils.py_utils.dumps(create_ipython_func(lowerCAmelCase_	, lowerCAmelCase_    )    )    ).hexdigest()
          snake_case_       ,	snake_case_						       =							os.path.join(gettempdir()	, "ipykernel_12345"	, "654123987.py"    ), [0]
          snake_case_						       =							mda(datasets.utils.py_utils.dumps(create_ipython_func(lowerCAmelCase_	, lowerCAmelCase_    )    )    ).hexdigest()
          self.assertEqual(lowerCAmelCase_	, lowerCAmelCase_    )
          self.assertNotEqual(lowerCAmelCase_	, lowerCAmelCase_    )
  
  
    def 		_lowerCamelCase	(self  : int    )   ->       List[Any]:
          snake_case_       ,	snake_case_						       =							[0], [1]
  
          def func():
                return foo, bar
  
          snake_case_						       =							"__main__"
  
          def globalvars_mocka_side_effect(lowerCAmelCase_  : str	, *lowerCAmelCase_  : Tuple	, **lowerCAmelCase_  : List[Any]    ):
                return {"foo": foo, "bar": bar}
  
          def globalvars_mocka_side_effect(lowerCAmelCase_  : List[str]	, *lowerCAmelCase_  : List[str]	, **lowerCAmelCase_  : Optional[Any]    ):
                return {"bar": bar, "foo": foo}
  
          with patch("dill.detect.globalvars"	, side_effect=lowerCAmelCase_    ) as globalvars_mocka:
                snake_case_						       =							mda(datasets.utils.py_utils.dumps(lowerCAmelCase_    )    ).hexdigest()
                self.assertGreater(globalvars_mocka.call_count	, 0    )
          with patch("dill.detect.globalvars"	, side_effect=lowerCAmelCase_    ) as globalvars_mocka:
                snake_case_						       =							mda(datasets.utils.py_utils.dumps(lowerCAmelCase_    )    ).hexdigest()
                self.assertGreater(globalvars_mocka.call_count	, 0    )
          self.assertEqual(lowerCAmelCase_	, lowerCAmelCase_    )
  
  
  
  class  lowerCAmelCase__   (       UpperCamelCase       ):
  
  
  
    '''simple docstring'''
  
  
  
  
  
  
    def 		_lowerCamelCase	(self  : Union[str, Any]    )   ->       Tuple:
          snake_case_						       =							Hasher.hash("hello"    )
          snake_case_						       =							Hasher.hash("hello"    )
          snake_case_						       =							Hasher.hash("there"    )
          self.assertEqual(lowerCAmelCase_	, lowerCAmelCase_    )
          self.assertNotEqual(lowerCAmelCase_	, lowerCAmelCase_    )
  
    def 		_lowerCamelCase	(self  : Any    )   ->       int:
          snake_case_						       =							Hasher.hash(Foo("hello"    )    )
          snake_case_						       =							Hasher.hash(Foo("hello"    )    )
          snake_case_						       =							Hasher.hash(Foo("there"    )    )
          self.assertEqual(lowerCAmelCase_	, lowerCAmelCase_    )
          self.assertNotEqual(lowerCAmelCase_	, lowerCAmelCase_    )
  
    def 		_lowerCamelCase	(self  : List[Any]    )   ->       List[Any]:
          snake_case_						       =							Hasher()
          for x in ["hello", Foo("hello"    )]:
                hasher.update(lowerCAmelCase_    )
          snake_case_						       =							hasher.hexdigest()
          snake_case_						       =							Hasher()
          for x in ["hello", Foo("hello"    )]:
                hasher.update(lowerCAmelCase_    )
          snake_case_						       =							hasher.hexdigest()
          snake_case_						       =							Hasher()
          for x in ["there", Foo("there"    )]:
                hasher.update(lowerCAmelCase_    )
          snake_case_						       =							hasher.hexdigest()
          self.assertEqual(lowerCAmelCase_	, lowerCAmelCase_    )
          self.assertNotEqual(lowerCAmelCase_	, lowerCAmelCase_    )
  
    def 		_lowerCamelCase	(self  : str    )   ->       List[Any]:
          with self.assertRaises(pickle.PicklingError    ):
                Hasher.hash(UnpicklableCallable(Foo("hello"    )    )    )
  
    def 		_lowerCamelCase	(self  : Dict    )   ->       Optional[int]:
          snake_case_						       =							"abc"
          snake_case_						       =							[string, string]  # two strings have the same ids
          snake_case_						       =							[string, string]
          snake_case_						       =							json.loads(f'''["{string}", "{string}"]'''    )  # two strings have different ids
          self.assertIs(obja[0]	, lowerCAmelCase_    )
          self.assertIs(obja[0]	, obja[1]    )
          self.assertIs(obja[0]	, lowerCAmelCase_    )
          self.assertIs(obja[0]	, obja[1]    )
          self.assertIsNot(obja[0]	, lowerCAmelCase_    )
          self.assertIsNot(obja[0]	, obja[1]    )
          snake_case_						       =							Hasher.hash(lowerCAmelCase_    )
          snake_case_						       =							Hasher.hash(lowerCAmelCase_    )
          snake_case_						       =							Hasher.hash(lowerCAmelCase_    )
          self.assertEqual(lowerCAmelCase_	, lowerCAmelCase_    )
          self.assertEqual(lowerCAmelCase_	, lowerCAmelCase_    )
  
    @require_tiktoken
    def 		_lowerCamelCase	(self  : Union[str, Any]    )   ->       Union[str, Any]:
          import tiktoken
  
          snake_case_						       =							tiktoken.get_encoding("gpt2"    )
          snake_case_						       =							mda(datasets.utils.py_utils.dumps(lowerCAmelCase_    )    ).hexdigest()
          snake_case_						       =							tiktoken.get_encoding("r50k_base"    )
          snake_case_						       =							mda(datasets.utils.py_utils.dumps(lowerCAmelCase_    )    ).hexdigest()
          snake_case_						       =							tiktoken.get_encoding("gpt2"    )
          snake_case_						       =							mda(datasets.utils.py_utils.dumps(lowerCAmelCase_    )    ).hexdigest()
          self.assertEqual(lowerCAmelCase_	, lowerCAmelCase_    )
          self.assertNotEqual(lowerCAmelCase_	, lowerCAmelCase_    )
  
    @require_torch
    def 		_lowerCamelCase	(self  : Optional[int]    )   ->       str:
          import torch
  
          snake_case_						       =							torch.tensor([1.0]    )
          snake_case_						       =							mda(datasets.utils.py_utils.dumps(lowerCAmelCase_    )    ).hexdigest()
          snake_case_						       =							torch.tensor([2.0]    )
          snake_case_						       =							mda(datasets.utils.py_utils.dumps(lowerCAmelCase_    )    ).hexdigest()
          snake_case_						       =							torch.tensor([1.0]    )
          snake_case_						       =							mda(datasets.utils.py_utils.dumps(lowerCAmelCase_    )    ).hexdigest()
          self.assertEqual(lowerCAmelCase_	, lowerCAmelCase_    )
          self.assertNotEqual(lowerCAmelCase_	, lowerCAmelCase_    )
  
  
    @require_spacy
    @require_spacy_model("en_core_web_sm"    )
    @require_spacy_model("fr_core_news_sm"    )
    @pytest.mark.integration
    def 		_lowerCamelCase	(self  : int    )   ->       Union[str, Any]:
          import spacy
  
          snake_case_						       =							spacy.load("en_core_web_sm"    )
          snake_case_						       =							mda(datasets.utils.py_utils.dumps(lowerCAmelCase_    )    ).hexdigest()
          snake_case_						       =							spacy.load("fr_core_news_sm"    )
          snake_case_						       =							mda(datasets.utils.py_utils.dumps(lowerCAmelCase_    )    ).hexdigest()
          snake_case_						       =							spacy.load("en_core_web_sm"    )
          snake_case_						       =							mda(datasets.utils.py_utils.dumps(lowerCAmelCase_    )    ).hexdigest()
          self.assertEqual(lowerCAmelCase_	, lowerCAmelCase_    )
          self.assertNotEqual(lowerCAmelCase_	, lowerCAmelCase_    )
  
  @pytest.mark.integration
  def   snake_case_       (							_a     :							Path			):
        snake_case_						       =							tmp_path / "dir1"
        snake_case_						       =							tmp_path / "dir2"
        dira.mkdir()
        dira.mkdir()
        snake_case_						       =							"script.py"
        snake_case_						       =							dedent(
            "\n    from datasets.fingerprint import Hasher\n    def foo():\n        pass\n    print(Hasher.hash(foo))\n    "			)
        snake_case_						       =							dira / script_filename
        snake_case_						       =							dira / script_filename
        with script_patha.open("w"			) as f:
              f.write(_a			)
        with script_patha.open("w"			) as f:
              f.write(_a			)
        snake_case_						       =							subprocess.check_output(["python", str(_a			)]			)
        snake_case_						       =							subprocess.check_output(["python", str(_a			)]			)
        assert fingerprinta == fingerprinta
  def   snake_case_       (							):
        snake_case_						       =							{"a": [0, 1, 2]}
        snake_case_						       =							DatasetChild(InMemoryTable.from_pydict(_a			)			)
        snake_case_						       =							dataset.funca()._fingerprint
        assert expected_fingerprint == dataset.funca()._fingerprint
        assert expected_fingerprint != dataset.funca()._fingerprint
  
        with Pool(2			) as p:
              assert expected_fingerprint == p.apply_async(dataset.funca			).get()._fingerprint
              assert expected_fingerprint != p.apply_async(dataset.funca			).get()._fingerprint
  def   snake_case_       (							):
        snake_case_						       =							{"a": [0, 1, 2]}
  
  
  
        class  lowerCAmelCase__   (       datasets.Dataset       ):
  
  
  
          '''simple docstring'''
  
  
  
  
  
  
          @fingerprint_transform(inplace=lowerCAmelCase_    )
          def 		_lowerCamelCase	(self  : int	, lowerCAmelCase_  : str    )   ->       List[Any]:
                return DummyDatasetChild(self.data	, fingerprint=lowerCAmelCase_    )
  
        snake_case_						       =							DummyDatasetChild(InMemoryTable.from_pydict(_a			)			).func()
  
  
  
        class  lowerCAmelCase__   (       datasets.Dataset       ):
  
  
  
          '''simple docstring'''
  
  
  
  
  
  
          @fingerprint_transform(inplace=lowerCAmelCase_	, version="1.0.0"    )
          def 		_lowerCamelCase	(self  : Dict	, lowerCAmelCase_  : Any    )   ->       Any:
                return DummyDatasetChild(self.data	, fingerprint=lowerCAmelCase_    )
  
        snake_case_						       =							DummyDatasetChild(InMemoryTable.from_pydict(_a			)			).func()
  
  
  
        class  lowerCAmelCase__   (       datasets.Dataset       ):
  
  
  
          '''simple docstring'''
  
  
  
  
  
  
          @fingerprint_transform(inplace=lowerCAmelCase_	, version="2.0.0"    )
          def 		_lowerCamelCase	(self  : Union[str, Any]	, lowerCAmelCase_  : Any    )   ->       int:
                return DummyDatasetChild(self.data	, fingerprint=lowerCAmelCase_    )
  
        snake_case_						       =							DummyDatasetChild(InMemoryTable.from_pydict(_a			)			).func()
  
        assert len({fingeprint_no_version, fingeprint_a, fingeprint_a}			) == 3
  
  
  
  
  def   snake_case_       (							):
        # AttributeError: module 'dill._dill' has no attribute 'stack'
        snake_case_						       =							Hasher()
        hasher.update(lambda _a			: x			)
  
  