


'''simple docstring'''






import unittest

from transformers import MobileBertConfig, 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, random_attention_mask
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
		import torch

		from transformers import (
		    MODEL_FOR_PRETRAINING_MAPPING,
		    MobileBertForMaskedLM,
		    MobileBertForMultipleChoice,
		    MobileBertForNextSentencePrediction,
		    MobileBertForPreTraining,
		    MobileBertForQuestionAnswering,
		    MobileBertForSequenceClassification,
		    MobileBertForTokenClassification,
		    MobileBertModel,
		)




class 		a__    :





							'''simple docstring'''






							def __init__(		self ,   lowerCamelCase_ ,   lowerCamelCase_=13 ,   lowerCamelCase_=7 ,   lowerCamelCase_=True ,   lowerCamelCase_=True ,   lowerCamelCase_=True ,   lowerCamelCase_=True ,   lowerCamelCase_=99 ,   lowerCamelCase_=64 ,   lowerCamelCase_=32 ,   lowerCamelCase_=5 ,   lowerCamelCase_=4 ,   lowerCamelCase_=37 ,   lowerCamelCase_="gelu" ,   lowerCamelCase_=0.1 ,   lowerCamelCase_=0.1 ,   lowerCamelCase_=5_12 ,   lowerCamelCase_=16 ,   lowerCamelCase_=2 ,   lowerCamelCase_=0.02 ,   lowerCamelCase_=3 ,   lowerCamelCase_=4 ,   lowerCamelCase_=None ,   )	->							str:
														lowerCAmelCase__	       =     parent
														lowerCAmelCase__	       =     batch_size
														lowerCAmelCase__	       =     seq_length
														lowerCAmelCase__	       =     is_training
														lowerCAmelCase__	       =     use_input_mask
														lowerCAmelCase__	       =     use_token_type_ids
														lowerCAmelCase__	       =     use_labels
														lowerCAmelCase__	       =     vocab_size
														lowerCAmelCase__	       =     hidden_size
														lowerCAmelCase__	       =     embedding_size
														lowerCAmelCase__	       =     num_hidden_layers
														lowerCAmelCase__	       =     num_attention_heads
														lowerCAmelCase__	       =     intermediate_size
														lowerCAmelCase__	       =     hidden_act
														lowerCAmelCase__	       =     hidden_dropout_prob
														lowerCAmelCase__	       =     attention_probs_dropout_prob
														lowerCAmelCase__	       =     max_position_embeddings
														lowerCAmelCase__	       =     type_vocab_size
														lowerCAmelCase__	       =     type_sequence_label_size
														lowerCAmelCase__	       =     initializer_range
														lowerCAmelCase__	       =     num_labels
														lowerCAmelCase__	       =     num_choices
														lowerCAmelCase__	       =     scope







							def   __SCREAMING_SNAKE_CASE							(		self       )	->							List[str]:
														lowerCAmelCase__	       =     ids_tensor([self.batch_size, self.seq_length] ,   self.vocab_size       )

														lowerCAmelCase__	       =     None
														if self.use_input_mask:
																					lowerCAmelCase__	       =     random_attention_mask([self.batch_size, self.seq_length]       )

														lowerCAmelCase__	       =     None
														if self.use_token_type_ids:
																					lowerCAmelCase__	       =     ids_tensor([self.batch_size, self.seq_length] ,   self.type_vocab_size       )

														lowerCAmelCase__	       =     None
														lowerCAmelCase__	       =     None
														lowerCAmelCase__	       =     None
														if self.use_labels:
																					lowerCAmelCase__	       =     ids_tensor([self.batch_size] ,   self.type_sequence_label_size       )
																					lowerCAmelCase__	       =     ids_tensor([self.batch_size, self.seq_length] ,   self.num_labels       )
																					lowerCAmelCase__	       =     ids_tensor([self.batch_size] ,   self.num_choices       )

														lowerCAmelCase__	       =     self.get_config()

														return config, input_ids, token_type_ids, input_mask, sequence_labels, token_labels, choice_labels







							def   __SCREAMING_SNAKE_CASE							(		self       )	->							Union[str, Any]:
														return MobileBertConfig(
														    vocab_size=self.vocab_size ,   hidden_size=self.hidden_size ,   num_hidden_layers=self.num_hidden_layers ,   num_attention_heads=self.num_attention_heads ,   intermediate_size=self.intermediate_size ,   embedding_size=self.embedding_size ,   hidden_act=self.hidden_act ,   hidden_dropout_prob=self.hidden_dropout_prob ,   attention_probs_dropout_prob=self.attention_probs_dropout_prob ,   max_position_embeddings=self.max_position_embeddings ,   type_vocab_size=self.type_vocab_size ,   is_decoder=lowerCamelCase_ ,   initializer_range=self.initializer_range ,   )







							def   __SCREAMING_SNAKE_CASE							(		self ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_       )	->							List[str]:
														lowerCAmelCase__	       =     MobileBertModel(config=lowerCamelCase_       )
														model.to(lowerCamelCase_       )
														model.eval()
														lowerCAmelCase__	       =     model(lowerCamelCase_ ,   attention_mask=lowerCamelCase_ ,   token_type_ids=lowerCamelCase_       )
														lowerCAmelCase__	       =     model(lowerCamelCase_ ,   token_type_ids=lowerCamelCase_       )
														lowerCAmelCase__	       =     model(lowerCamelCase_       )

														self.parent.assertEqual(result.last_hidden_state.shape ,   (self.batch_size, self.seq_length, self.hidden_size)       )
														self.parent.assertEqual(result.pooler_output.shape ,   (self.batch_size, self.hidden_size)       )







							def   __SCREAMING_SNAKE_CASE							(		self ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_       )	->							int:
														lowerCAmelCase__	       =     MobileBertForMaskedLM(config=lowerCamelCase_       )
														model.to(lowerCamelCase_       )
														model.eval()
														lowerCAmelCase__	       =     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   __SCREAMING_SNAKE_CASE							(		self ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_       )	->							Union[str, Any]:
														lowerCAmelCase__	       =     MobileBertForNextSentencePrediction(config=lowerCamelCase_       )
														model.to(lowerCamelCase_       )
														model.eval()
														lowerCAmelCase__	       =     model(
														    lowerCamelCase_ ,   attention_mask=lowerCamelCase_ ,   token_type_ids=lowerCamelCase_ ,   labels=lowerCamelCase_ ,   )
														self.parent.assertEqual(result.logits.shape ,   (self.batch_size, 2)       )







							def   __SCREAMING_SNAKE_CASE							(		self ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_       )	->							List[str]:
														lowerCAmelCase__	       =     MobileBertForPreTraining(config=lowerCamelCase_       )
														model.to(lowerCamelCase_       )
														model.eval()
														lowerCAmelCase__	       =     model(
														    lowerCamelCase_ ,   attention_mask=lowerCamelCase_ ,   token_type_ids=lowerCamelCase_ ,   labels=lowerCamelCase_ ,   next_sentence_label=lowerCamelCase_ ,   )
														self.parent.assertEqual(result.prediction_logits.shape ,   (self.batch_size, self.seq_length, self.vocab_size)       )
														self.parent.assertEqual(result.seq_relationship_logits.shape ,   (self.batch_size, 2)       )







							def   __SCREAMING_SNAKE_CASE							(		self ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_       )	->							Any:
														lowerCAmelCase__	       =     MobileBertForQuestionAnswering(config=lowerCamelCase_       )
														model.to(lowerCamelCase_       )
														model.eval()
														lowerCAmelCase__	       =     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   __SCREAMING_SNAKE_CASE							(		self ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_       )	->							Dict:
														lowerCAmelCase__	       =     self.num_labels
														lowerCAmelCase__	       =     MobileBertForSequenceClassification(lowerCamelCase_       )
														model.to(lowerCamelCase_       )
														model.eval()
														lowerCAmelCase__	       =     model(lowerCamelCase_ ,   attention_mask=lowerCamelCase_ ,   token_type_ids=lowerCamelCase_ ,   labels=lowerCamelCase_       )
														self.parent.assertEqual(result.logits.shape ,   (self.batch_size, self.num_labels)       )







							def   __SCREAMING_SNAKE_CASE							(		self ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_       )	->							int:
														lowerCAmelCase__	       =     self.num_labels
														lowerCAmelCase__	       =     MobileBertForTokenClassification(config=lowerCamelCase_       )
														model.to(lowerCamelCase_       )
														model.eval()
														lowerCAmelCase__	       =     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   __SCREAMING_SNAKE_CASE							(		self ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_       )	->							List[Any]:
														lowerCAmelCase__	       =     self.num_choices
														lowerCAmelCase__	       =     MobileBertForMultipleChoice(config=lowerCamelCase_       )
														model.to(lowerCamelCase_       )
														model.eval()
														lowerCAmelCase__	       =     input_ids.unsqueeze(1       ).expand(-1 ,   self.num_choices ,   -1       ).contiguous()
														lowerCAmelCase__	       =     token_type_ids.unsqueeze(1       ).expand(-1 ,   self.num_choices ,   -1       ).contiguous()
														lowerCAmelCase__	       =     input_mask.unsqueeze(1       ).expand(-1 ,   self.num_choices ,   -1       ).contiguous()
														lowerCAmelCase__	       =     model(
														    lowerCamelCase_ ,   attention_mask=lowerCamelCase_ ,   token_type_ids=lowerCamelCase_ ,   labels=lowerCamelCase_ ,   )
														self.parent.assertEqual(result.logits.shape ,   (self.batch_size, self.num_choices)       )







							def   __SCREAMING_SNAKE_CASE							(		self       )	->							List[str]:
														lowerCAmelCase__	       =     self.prepare_config_and_inputs()
														(
														    (
														    lowerCAmelCase__
														)       , (
														    lowerCAmelCase__
														)       , (
														    lowerCAmelCase__
														)       , (
														    lowerCAmelCase__
														)       , (
														    lowerCAmelCase__
														)       , (
														    lowerCAmelCase__
														)       , (
														    lowerCAmelCase__
														)       , 
														)	       =     config_and_inputs
														lowerCAmelCase__	       =     {'''input_ids''': input_ids, '''token_type_ids''': token_type_ids, '''attention_mask''': input_mask}
														return config, inputs_dict




@require_torch
class 		a__    (							a__    ,    a__    ,    unittest.TestCase  ):





							'''simple docstring'''






							lowercase__      :       int     						=				(
							    (
							        MobileBertModel,
							        MobileBertForMaskedLM,
							        MobileBertForMultipleChoice,
							        MobileBertForNextSentencePrediction,
							        MobileBertForPreTraining,
							        MobileBertForQuestionAnswering,
							        MobileBertForSequenceClassification,
							        MobileBertForTokenClassification,
							    )
							    if is_torch_available()
							    else ()
							)
							lowercase__      :       List[Any]     						=				(
							    {
							        "feature-extraction": MobileBertModel,
							        "fill-mask": MobileBertForMaskedLM,
							        "question-answering": MobileBertForQuestionAnswering,
							        "text-classification": MobileBertForSequenceClassification,
							        "token-classification": MobileBertForTokenClassification,
							        "zero-shot": MobileBertForSequenceClassification,
							    }
							    if is_torch_available()
							    else {}
							)
							lowercase__      :       Tuple     						=				True







							def   __SCREAMING_SNAKE_CASE							(		self ,   lowerCamelCase_ ,   lowerCamelCase_ ,   lowerCamelCase_=False       )	->							str:
														lowerCAmelCase__	       =     super()._prepare_for_class(lowerCamelCase_ ,   lowerCamelCase_ ,   return_labels=lowerCamelCase_       )

														if return_labels:
																					if model_class in get_values(lowerCamelCase_       ):
																												lowerCAmelCase__	       =     torch.zeros(
																												    (self.model_tester.batch_size, self.model_tester.seq_length) ,   dtype=torch.long ,   device=lowerCamelCase_       )
																												lowerCAmelCase__	       =     torch.zeros(
																												    self.model_tester.batch_size ,   dtype=torch.long ,   device=lowerCamelCase_       )
														return inputs_dict







							def   __SCREAMING_SNAKE_CASE							(		self       )	->							str:
														lowerCAmelCase__	       =     MobileBertModelTester(self       )
														lowerCAmelCase__	       =     ConfigTester(self ,   config_class=lowerCamelCase_ ,   hidden_size=37       )







							def   __SCREAMING_SNAKE_CASE							(		self       )	->							int:
														self.config_tester.run_common_tests()







							def   __SCREAMING_SNAKE_CASE							(		self       )	->							Dict:
														lowerCAmelCase__	       =     self.model_tester.prepare_config_and_inputs()
														self.model_tester.create_and_check_mobilebert_model(*lowerCamelCase_       )







							def   __SCREAMING_SNAKE_CASE							(		self       )	->							List[Any]:
														lowerCAmelCase__	       =     self.model_tester.prepare_config_and_inputs()
														self.model_tester.create_and_check_mobilebert_for_masked_lm(*lowerCamelCase_       )







							def   __SCREAMING_SNAKE_CASE							(		self       )	->							str:
														lowerCAmelCase__	       =     self.model_tester.prepare_config_and_inputs()
														self.model_tester.create_and_check_mobilebert_for_multiple_choice(*lowerCamelCase_       )







							def   __SCREAMING_SNAKE_CASE							(		self       )	->							Optional[int]:
														lowerCAmelCase__	       =     self.model_tester.prepare_config_and_inputs()
														self.model_tester.create_and_check_mobilebert_for_next_sequence_prediction(*lowerCamelCase_       )







							def   __SCREAMING_SNAKE_CASE							(		self       )	->							List[Any]:
														lowerCAmelCase__	       =     self.model_tester.prepare_config_and_inputs()
														self.model_tester.create_and_check_mobilebert_for_pretraining(*lowerCamelCase_       )







							def   __SCREAMING_SNAKE_CASE							(		self       )	->							List[str]:
														lowerCAmelCase__	       =     self.model_tester.prepare_config_and_inputs()
														self.model_tester.create_and_check_mobilebert_for_question_answering(*lowerCamelCase_       )







							def   __SCREAMING_SNAKE_CASE							(		self       )	->							str:
														lowerCAmelCase__	       =     self.model_tester.prepare_config_and_inputs()
														self.model_tester.create_and_check_mobilebert_for_sequence_classification(*lowerCamelCase_       )







							def   __SCREAMING_SNAKE_CASE							(		self       )	->							Any:
														lowerCAmelCase__	       =     self.model_tester.prepare_config_and_inputs()
														self.model_tester.create_and_check_mobilebert_for_token_classification(*lowerCamelCase_       )


def  _snake_case       (					A	)						->   str:
							return torch.tensor(
							    A			,   dtype=torch.long			,   device=A			,   )


__UpperCAmelCase       =							1e-3






@require_torch
@require_sentencepiece
@require_tokenizers
class 		a__    (							unittest.TestCase  ):





							'''simple docstring'''






							@slow
							def   __SCREAMING_SNAKE_CASE							(		self       )	->							List[str]:
														lowerCAmelCase__	       =     MobileBertModel.from_pretrained('''google/mobilebert-uncased'''       ).to(lowerCamelCase_       )
														lowerCAmelCase__	       =     _long_tensor([[1_01, 71_10, 10_05, 10_56, 20_23, 1_13_33, 1_74_13, 10_29, 1_02]]       )
														with torch.no_grad():
																					lowerCAmelCase__	       =     model(lowerCamelCase_       )[0]
														lowerCAmelCase__	       =     torch.Size((1, 9, 5_12)       )
														self.assertEqual(output.shape ,   lowerCamelCase_       )
														lowerCAmelCase__	       =     torch.tensor(
														    [
														        [
														            [-2.4_73_65_26e07, 8.2_69_16_56e04, 1.6_52_18_38e05],
														            [-5.7_54_17_04e-01, 3.9_05_60_22e00, 4.4_01_15_07e00],
														            [2.6_04_73_59e00, 1.5_67_76_52e00, -1.7_32_41_88e-01],
														        ]
														    ] ,   device=lowerCamelCase_ ,   )

														# MobileBERT results range from 10e0 to 10e8. Even a 0.0000001% difference with a value of 10e8 results in a
														# ~1 difference, it's therefore not a good idea to measure using addition.
														# Here, we instead divide the expected result with the result in order to obtain ~1. We then check that the
														# result is held between bounds: 1 - TOLERANCE < expected_result / result < 1 + TOLERANCE
														lowerCAmelCase__	       =     torch.all((expected_slice / output[..., :3, :3]) >= 1 - TOLERANCE       )
														lowerCAmelCase__	       =     torch.all((expected_slice / output[..., :3, :3]) <= 1 + TOLERANCE       )

														self.assertTrue(lower_bound and upper_bound       )



'''simple docstring'''






import os
from typing import Optional

import fsspec
from fsspec.archive import AbstractArchiveFileSystem
from fsspec.utils import DEFAULT_BLOCK_SIZE




class 		a__    (							a__  ):





							'''simple docstring'''






							lowercase__      :       Dict     						=				""
							lowercase__      :       str     						=				(
							    None  # protocol passed in prefix to the url. ex: "gzip", for gzip://file.txt::http://foo.bar/file.txt.gz
							)
							lowercase__      :       str     						=				None  # compression type in fsspec. ex: "gzip"
							lowercase__      :       str     						=				None  # extension of the filename to strip. ex: "".gz" to get file.txt from file.txt.gz







							def __init__(		self ,   lowerCamelCase_ = "" ,   lowerCamelCase_ = None ,   lowerCamelCase_ = None ,   **lowerCamelCase_       )	->							Any:
														super().__init__(self ,   **lowerCamelCase_       )
														# always open as "rb" since fsspec can then use the TextIOWrapper to make it work for "r" mode
														lowerCAmelCase__	       =     fsspec.open(
														    lowerCamelCase_ ,   mode='''rb''' ,   protocol=lowerCamelCase_ ,   compression=self.compression ,   client_kwargs={
														        '''requote_redirect_url''': False,  # see https://github.com/huggingface/datasets/pull/5459
														        '''trust_env''': True,  # Enable reading proxy env variables.
														        **(target_options or {}).pop('''client_kwargs''' ,   {}       ),  # To avoid issues if it was already passed.
														    } ,   **(target_options or {}) ,   )
														lowerCAmelCase__	       =     os.path.basename(self.file.path.split('''::'''       )[0]       )
														lowerCAmelCase__	       =     (
														    self.compressed_name[: self.compressed_name.rindex('''.'''       )]
														    if '''.''' in self.compressed_name
														    else self.compressed_name
														)
														lowerCAmelCase__	       =     None







							@classmethod
							def   __SCREAMING_SNAKE_CASE							(		cls ,   lowerCamelCase_       )	->							Any:
														# compressed file paths are always relative to the archive root
														return super()._strip_protocol(lowerCamelCase_       ).lstrip('''/'''       )







							def   __SCREAMING_SNAKE_CASE							(		self       )	->							Optional[int]:
														if self.dir_cache is None:
																					lowerCAmelCase__	       =     {**self.file.fs.info(self.file.path       ), '''name''': self.uncompressed_name}
																					lowerCAmelCase__	       =     {f['''name''']: f}







							def   __SCREAMING_SNAKE_CASE							(		self ,   lowerCamelCase_       )	->							List[Any]:
														return self.file.open().read()







							def   __SCREAMING_SNAKE_CASE							(		self ,   lowerCamelCase_ ,   lowerCamelCase_ = "rb" ,   lowerCamelCase_=None ,   lowerCamelCase_=True ,   lowerCamelCase_=None ,   **lowerCamelCase_ ,   )	->							List[str]:
														lowerCAmelCase__	       =     self._strip_protocol(lowerCamelCase_       )
														if mode != "rb":
																					raise ValueError(F"""Tried to read with mode {mode} on file {self.file.path} opened with mode 'rb'"""       )
														return self.file.open()




class 		a__    (							a__  ):





							'''simple docstring'''






							lowercase__      :       Optional[Any]     						=				"bz2"
							lowercase__      :       str     						=				"bz2"
							lowercase__      :       Optional[int]     						=				".bz2"




class 		a__    (							a__  ):





							'''simple docstring'''






							lowercase__      :       Any     						=				"gzip"
							lowercase__      :       int     						=				"gzip"
							lowercase__      :       int     						=				".gz"




class 		a__    (							a__  ):





							'''simple docstring'''






							lowercase__      :       Tuple     						=				"lz4"
							lowercase__      :       Optional[Any]     						=				"lz4"
							lowercase__      :       int     						=				".lz4"




class 		a__    (							a__  ):





							'''simple docstring'''






							lowercase__      :       Optional[int]     						=				"xz"
							lowercase__      :       str     						=				"xz"
							lowercase__      :       List[Any]     						=				".xz"




class 		a__    (							a__  ):





							'''simple docstring'''






							lowercase__      :       Union[str, Any]     						=				"zstd"
							lowercase__      :       Union[str, Any]     						=				"zstd"
							lowercase__      :       Dict     						=				".zst"







							def __init__(		self ,   lowerCamelCase_ ,   lowerCamelCase_ = "rb" ,   lowerCamelCase_ = None ,   lowerCamelCase_ = None ,   lowerCamelCase_ = DEFAULT_BLOCK_SIZE ,   **lowerCamelCase_ ,   )	->							List[Any]:
														super().__init__(
														    fo=lowerCamelCase_ ,   mode=lowerCamelCase_ ,   target_protocol=lowerCamelCase_ ,   target_options=lowerCamelCase_ ,   block_size=lowerCamelCase_ ,   **lowerCamelCase_ ,   )
														# We need to wrap the zstd decompressor to avoid this error in fsspec==2021.7.0 and zstandard==0.15.2:
														#
														# File "/Users/user/.virtualenvs/hf-datasets/lib/python3.7/site-packages/fsspec/core.py", line 145, in open
														#     out.close = close
														# AttributeError: 'zstd.ZstdDecompressionReader' object attribute 'close' is read-only
														#
														# see https://github.com/intake/filesystem_spec/issues/725
														lowerCAmelCase__	       =     self.file.__enter__




														class 		a__    :





																					'''simple docstring'''






																					def __init__(		self ,   lowerCamelCase_       )	->							List[str]:
																												lowerCAmelCase__	       =     file_







																					def __enter__(		self       )	->							Tuple:
																												self._file.__enter__()
																												return self







																					def __exit__(		self ,   *lowerCamelCase_ ,   **lowerCamelCase_       )	->							str:
																												self._file.__exit__(*lowerCamelCase_ ,   **lowerCamelCase_       )







																					def __iter__(		self       )	->							Any:
																												return iter(self._file       )







																					def   __SCREAMING_SNAKE_CASE							(		self       )	->							Union[str, Any]:
																												return next(self._file       )







																					def __getattr__(		self ,   lowerCamelCase_       )	->							str:
																												return getattr(self._file ,   lowerCamelCase_       )

														def fixed_enter(*lowerCamelCase_ ,   **lowerCamelCase_       ):
																					return WrappedFile(_enter(*lowerCamelCase_ ,   **lowerCamelCase_       )       )

														lowerCAmelCase__	       =     fixed_enter