





'''simple docstring'''


import json
import os
import shutil
import warnings
from argparse import ArgumentParser, Namespace
from pathlib import Path
from typing import List

from ..utils import logging
from . import BaseTransformersCLICommand


try:
 from cookiecutter.main import cookiecutter

 lowerCAmelCase					:     Optional[Any]												=True
except ImportError:
 lowerCAmelCase					:     Dict												=False

lowerCAmelCase					:     Tuple												=logging.get_logger(__name__)  # pylint: disable=invalid-name
def 							UpperCAmelCase_  (						__lowerCamelCase					:					Namespace ):
   return AddNewModelCommand(args.testing	,args.testing_file	,path=args.path )


class       a_   (				_lowerCAmelCase							):





     @staticmethod
     def 							lowercase__      ( lowercase		:					ArgumentParser						):





        """simple docstring"""




        lowercase_			:Optional[int]    			= parser.add_parser("add-new-model"						)
        add_new_model_parser.add_argument("--testing"	,      action="store_true"	,      help="If in testing mode."						)
        add_new_model_parser.add_argument("--testing_file"	,      type=lowercase	,      help="Configuration file on which to run."						)
        add_new_model_parser.add_argument(
            "--path"	,      type=lowercase	,      help="Path to cookiecutter. Should only be used for testing purposes."						)
        add_new_model_parser.set_defaults(func=lowercase						)





     def __init__( self		:					str	,      lowercase		:					bool	,      lowercase		:					str	,      lowercase		:					Any=None	,      *lowercase		:					Union[str, Any]						):





        """simple docstring"""




        lowercase_			:Any    			= testing
        lowercase_			:str    			= testing_file
        lowercase_			:int    			= path







     def 							lowercase__      ( self		:					Tuple						):





        """simple docstring"""




        warnings.warn(
            "The command `transformers-cli add-new-model` is deprecated and will be removed in v5 of Transformers. "
            "It is not actively maintained anymore, so might give a result that won't pass all tests and quality "
            "checks, you should use `transformers-cli add-new-model-like` instead."						)
        if not _has_cookiecutter:
           raise ImportError(
               "Model creation dependencies are required to use the `add_new_model` command. Install them by running "
               "the following at the root of your `transformers` clone:\n\n\t$ pip install -e .[modelcreation]\n"						)
        # Ensure that there is no other `cookiecutter-template-xxx` directory in the current working directory
        lowercase_			:int    			= [directory for directory in os.listdir() if "cookiecutter-template-" == directory[:22]]
        if len(lowercase						) > 0:
           raise ValueError(
               "Several directories starting with `cookiecutter-template-` in current working directory. "
               "Please clean your directory by removing all folders starting with `cookiecutter-template-` or "
               "change your working directory."						)

        lowercase_			:str    			= (
            Path(lowercase						).parent.parent.parent.parent if self._path is None else Path(self._path						).parent.parent
        )
        lowercase_			:Union[str, Any]    			= path_to_transformer_root / "templates" / "adding_a_new_model"

        # Execute cookiecutter
        if not self._testing:
           cookiecutter(str(lowercase						)						)
        else:
           with open(self._testing_file	,      "r"						) as configuration_file:
              lowercase_			:Optional[int]    			= json.load(lowercase						)

           cookiecutter(
               str(path_to_cookiecutter if self._path is None else self._path						)	,      no_input=lowercase	,      extra_context=lowercase	,      )

        lowercase_			:Dict    			= [directory for directory in os.listdir() if "cookiecutter-template-" in directory[:22]][0]

        # Retrieve configuration
        with open(directory + "/configuration.json"	,      "r"						) as configuration_file:
           lowercase_			:Union[str, Any]    			= json.load(lowercase						)

        lowercase_			:List[Any]    			= configuration["lowercase_modelname"]
        lowercase_			:Tuple    			= configuration["generate_tensorflow_pytorch_and_flax"]
        os.remove(F'{directory}/configuration.json'						)

        lowercase_			:Optional[int]    			= "PyTorch" in generate_tensorflow_pytorch_and_flax
        lowercase_			:int    			= "TensorFlow" in generate_tensorflow_pytorch_and_flax
        lowercase_			:Any    			= "Flax" in generate_tensorflow_pytorch_and_flax

        lowercase_			:List[str]    			= F'{path_to_transformer_root}/src/transformers/models/{lowercase_model_name}'
        os.makedirs(lowercase	,      exist_ok=lowercase						)
        os.makedirs(F'{path_to_transformer_root}/tests/models/{lowercase_model_name}'	,      exist_ok=lowercase						)

        # Tests require submodules as they have parent imports
        with open(F'{path_to_transformer_root}/tests/models/{lowercase_model_name}/__init__.py'	,      "w"						):
           pass

        shutil.move(
            F'{directory}/__init__.py'	,      F'{model_dir}/__init__.py'	,      )
        shutil.move(
            F'{directory}/configuration_{lowercase_model_name}.py'	,      F'{model_dir}/configuration_{lowercase_model_name}.py'	,      )

        def remove_copy_lines(lowercase		:					Optional[Any]						):
           with open(lowercase	,      "r"						) as f:
              lowercase_			:Optional[Any]    			= f.readlines()
           with open(lowercase	,      "w"						) as f:
              for line in lines:
                 if "# Copied from transformers." not in line:
                    f.write(lowercase						)

        if output_pytorch:
           if not self._testing:
              remove_copy_lines(F'{directory}/modeling_{lowercase_model_name}.py'						)

           shutil.move(
               F'{directory}/modeling_{lowercase_model_name}.py'	,      F'{model_dir}/modeling_{lowercase_model_name}.py'	,      )

           shutil.move(
               F'{directory}/test_modeling_{lowercase_model_name}.py'	,      F'{path_to_transformer_root}/tests/models/{lowercase_model_name}/test_modeling_{lowercase_model_name}.py'	,      )
        else:
           os.remove(F'{directory}/modeling_{lowercase_model_name}.py'						)
           os.remove(F'{directory}/test_modeling_{lowercase_model_name}.py'						)

        if output_tensorflow:
           if not self._testing:
              remove_copy_lines(F'{directory}/modeling_tf_{lowercase_model_name}.py'						)

           shutil.move(
               F'{directory}/modeling_tf_{lowercase_model_name}.py'	,      F'{model_dir}/modeling_tf_{lowercase_model_name}.py'	,      )

           shutil.move(
               F'{directory}/test_modeling_tf_{lowercase_model_name}.py'	,      F'{path_to_transformer_root}/tests/models/{lowercase_model_name}/test_modeling_tf_{lowercase_model_name}.py'	,      )
        else:
           os.remove(F'{directory}/modeling_tf_{lowercase_model_name}.py'						)
           os.remove(F'{directory}/test_modeling_tf_{lowercase_model_name}.py'						)

        if output_flax:
           if not self._testing:
              remove_copy_lines(F'{directory}/modeling_flax_{lowercase_model_name}.py'						)

           shutil.move(
               F'{directory}/modeling_flax_{lowercase_model_name}.py'	,      F'{model_dir}/modeling_flax_{lowercase_model_name}.py'	,      )

           shutil.move(
               F'{directory}/test_modeling_flax_{lowercase_model_name}.py'	,      F'{path_to_transformer_root}/tests/models/{lowercase_model_name}/test_modeling_flax_{lowercase_model_name}.py'	,      )
        else:
           os.remove(F'{directory}/modeling_flax_{lowercase_model_name}.py'						)
           os.remove(F'{directory}/test_modeling_flax_{lowercase_model_name}.py'						)

        shutil.move(
            F'{directory}/{lowercase_model_name}.md'	,      F'{path_to_transformer_root}/docs/source/en/model_doc/{lowercase_model_name}.md'	,      )

        shutil.move(
            F'{directory}/tokenization_{lowercase_model_name}.py'	,      F'{model_dir}/tokenization_{lowercase_model_name}.py'	,      )

        shutil.move(
            F'{directory}/tokenization_fast_{lowercase_model_name}.py'	,      F'{model_dir}/tokenization_{lowercase_model_name}_fast.py'	,      )

        from os import fdopen, remove
        from shutil import copymode, move
        from tempfile import mkstemp

        def replace(lowercase		:					str	,      lowercase		:					str	,      lowercase		:					List[str]						):
           # Create temp file
           lowercase_			,							lowercase_			:str    			= mkstemp()
           lowercase_			:Tuple    			= False
           with fdopen(lowercase	,      "w"						) as new_file:
              with open(lowercase						) as old_file:
                 for line in old_file:
                    new_file.write(lowercase						)
                    if line_to_copy_below in line:
                       lowercase_			:List[Any]    			= True
                       for line_to_copy in lines_to_copy:
                          new_file.write(lowercase						)

           if not line_found:
              raise ValueError(F'Line {line_to_copy_below} was not found in file.'						)

           # Copy the file permissions from the old file to the new file
           copymode(lowercase	,      lowercase						)
           # Remove original file
           remove(lowercase						)
           # Move new file
           move(lowercase	,      lowercase						)

        def skip_units(lowercase		:					str						):
           return (
               ("generating PyTorch" in line and not output_pytorch)
               or ("generating TensorFlow" in line and not output_tensorflow)
               or ("generating Flax" in line and not output_flax)
           )

        def replace_in_files(lowercase		:					Dict						):
           with open(lowercase						) as datafile:
              lowercase_			:Dict    			= []
              lowercase_			:List[Any]    			= False
              lowercase_			:Union[str, Any]    			= False
              for line in datafile:
                 if "# To replace in: " in line and "##" not in line:
                    lowercase_			:Optional[int]    			= line.split("\""						)[1]
                    lowercase_			:List[Any]    			= skip_units(lowercase						)
                 elif "# Below: " in line and "##" not in line:
                    lowercase_			:Any    			= line.split("\""						)[1]
                    lowercase_			:int    			= skip_units(lowercase						)
                 elif "# End." in line and "##" not in line:
                    if not skip_file and not skip_snippet:
                       replace(lowercase	,      lowercase	,      lowercase						)

                    lowercase_			:List[str]    			= []
                 elif "# Replace with" in line and "##" not in line:
                    lowercase_			:str    			= []
                 elif "##" not in line:
                    lines_to_copy.append(lowercase						)

           remove(lowercase						)

        replace_in_files(F'{directory}/to_replace_{lowercase_model_name}.py'						)
        os.rmdir(lowercase						)









'''simple docstring'''


import json
import os
from pathlib import Path
from shutil import copyfile
from typing import Any, Dict, List, Optional, Tuple, Union

import sentencepiece

from ...tokenization_utils import BatchEncoding, PreTrainedTokenizer
from ...utils import logging


lowerCAmelCase					:     int												=logging.get_logger(__name__)

lowerCAmelCase					:     List[str]												='''▁'''

lowerCAmelCase					:     List[str]												={
    '''vocab_file''': '''vocab.json''',
    '''spm_file''': '''sentencepiece.bpe.model''',
    '''tokenizer_config_file''': '''tokenizer_config.json''',
}

lowerCAmelCase					:     Optional[Any]												={
    '''vocab_file''': {
        '''facebook/m2m100_418M''': '''https://huggingface.co/facebook/m2m100_418M/resolve/main/vocab.json''',
        '''facebook/m2m100_1.2B''': '''https://huggingface.co/facebook/m2m100_1.2B/resolve/main/vocab.json''',
    },
    '''spm_file''': {
        '''facebook/m2m100_418M''': '''https://huggingface.co/facebook/m2m100_418M/resolve/main/sentencepiece.bpe.model''',
        '''facebook/m2m100_1.2B''': '''https://huggingface.co/facebook/m2m100_1.2B/resolve/main/sentencepiece.bpe.model''',
    },
    '''tokenizer_config_file''': {
        '''facebook/m2m100_418M''': '''https://huggingface.co/facebook/m2m100_418M/resolve/main/tokenizer_config.json''',
        '''facebook/m2m100_1.2B''': '''https://huggingface.co/facebook/m2m100_1.2B/resolve/main/tokenizer_config.json''',
    },
}

lowerCAmelCase					:     int												={
    '''facebook/m2m100_418M''': 1_024,
}

# fmt: off
lowerCAmelCase					:     str												={
    '''m2m100''': ['''af''', '''am''', '''ar''', '''ast''', '''az''', '''ba''', '''be''', '''bg''', '''bn''', '''br''', '''bs''', '''ca''', '''ceb''', '''cs''', '''cy''', '''da''', '''de''', '''el''', '''en''', '''es''', '''et''', '''fa''', '''ff''', '''fi''', '''fr''', '''fy''', '''ga''', '''gd''', '''gl''', '''gu''', '''ha''', '''he''', '''hi''', '''hr''', '''ht''', '''hu''', '''hy''', '''id''', '''ig''', '''ilo''', '''is''', '''it''', '''ja''', '''jv''', '''ka''', '''kk''', '''km''', '''kn''', '''ko''', '''lb''', '''lg''', '''ln''', '''lo''', '''lt''', '''lv''', '''mg''', '''mk''', '''ml''', '''mn''', '''mr''', '''ms''', '''my''', '''ne''', '''nl''', '''no''', '''ns''', '''oc''', '''or''', '''pa''', '''pl''', '''ps''', '''pt''', '''ro''', '''ru''', '''sd''', '''si''', '''sk''', '''sl''', '''so''', '''sq''', '''sr''', '''ss''', '''su''', '''sv''', '''sw''', '''ta''', '''th''', '''tl''', '''tn''', '''tr''', '''uk''', '''ur''', '''uz''', '''vi''', '''wo''', '''xh''', '''yi''', '''yo''', '''zh''', '''zu'''],
    '''wmt21''': ['''en''', '''ha''', '''is''', '''ja''', '''cs''', '''ru''', '''zh''', '''de''']
}
class       a_   (				_lowerCAmelCase							):
     __A      =			VOCAB_FILES_NAMES
     __A      =			PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
     __A      =			PRETRAINED_VOCAB_FILES_MAP
     __A      =			["input_ids", "attention_mask"]

     __A      =			[]
     __A      =			[]





     def __init__( self		:					Any	,      lowercase		:					Any	,      lowercase		:					List[Any]	,      lowercase		:					int=None	,      lowercase		:					Optional[Any]=None	,      lowercase		:					Union[str, Any]="<s>"	,      lowercase		:					Any="</s>"	,      lowercase		:					Optional[int]="</s>"	,      lowercase		:					List[Any]="<pad>"	,      lowercase		:					Optional[int]="<unk>"	,      lowercase		:					Optional[int]="m2m100"	,      lowercase		:					Optional[Dict[str, Any]] = None	,      lowercase		:					Any=8	,      **lowercase		:					int	,      ):





        """simple docstring"""




        lowercase_			:Optional[int]    			= {} if sp_model_kwargs is None else sp_model_kwargs

        lowercase_			:Optional[Any]    			= language_codes
        lowercase_			:Tuple    			= FAIRSEQ_LANGUAGE_CODES[language_codes]
        lowercase_			:List[Any]    			= {lang_code: F'__{lang_code}__' for lang_code in fairseq_language_code}

        lowercase_			:Union[str, Any]    			= kwargs.get("additional_special_tokens"	,      []						)
        kwargs["additional_special_tokens"] += [
            self.get_lang_token(lowercase						)
            for lang_code in fairseq_language_code
            if self.get_lang_token(lowercase						) not in kwargs["additional_special_tokens"]
        ]

        super().__init__(
            src_lang=lowercase	,      tgt_lang=lowercase	,      bos_token=lowercase	,      eos_token=lowercase	,      sep_token=lowercase	,      unk_token=lowercase	,      pad_token=lowercase	,      language_codes=lowercase	,      sp_model_kwargs=self.sp_model_kwargs	,      num_madeup_words=lowercase	,      **lowercase	,      )

        lowercase_			:Optional[int]    			= vocab_file
        lowercase_			:Any    			= load_json(lowercase						)
        lowercase_			:Optional[Any]    			= {v: k for k, v in self.encoder.items()}
        lowercase_			:List[str]    			= spm_file
        lowercase_			:List[str]    			= load_spm(lowercase	,      self.sp_model_kwargs						)

        lowercase_			:Optional[int]    			= len(self.encoder						)

        lowercase_			:int    			= {
            self.get_lang_token(lowercase						): self.encoder_size + i for i, lang_code in enumerate(lowercase						)
        }
        lowercase_			:List[Any]    			= {lang_code: self.encoder_size + i for i, lang_code in enumerate(lowercase						)}
        lowercase_			:List[Any]    			= {v: k for k, v in self.lang_token_to_id.items()}

        lowercase_			:int    			= src_lang if src_lang is not None else "en"
        lowercase_			:Union[str, Any]    			= tgt_lang
        lowercase_			:List[Any]    			= self.get_lang_id(self._src_lang						)
        self.set_src_lang_special_tokens(self._src_lang						)

        lowercase_			:int    			= num_madeup_words





     @property
     def 							lowercase__      ( self		:					List[str]						):





        """simple docstring"""




        return len(self.encoder						) + len(self.lang_token_to_id						)





     @property
     def 							lowercase__      ( self		:					Any						):





        """simple docstring"""




        return self._src_lang





     @src_lang.setter
     def 							lowercase__      ( self		:					Optional[int]	,      lowercase		:					str						):





        """simple docstring"""




        lowercase_			:str    			= new_src_lang
        self.set_src_lang_special_tokens(self._src_lang						)





     def 							lowercase__      ( self		:					Dict	,      lowercase		:					str						):





        """simple docstring"""




        return self.sp_model.encode(lowercase	,      out_type=lowercase						)





     def 							lowercase__      ( self		:					Tuple	,      lowercase		:					Dict						):





        """simple docstring"""




        if token in self.lang_token_to_id:
           return self.lang_token_to_id[token]
        return self.encoder.get(lowercase	,      self.encoder[self.unk_token]						)





     def 							lowercase__      ( self		:					Any	,      lowercase		:					int						):





        """simple docstring"""




        if index in self.id_to_lang_token:
           return self.id_to_lang_token[index]
        return self.decoder.get(lowercase	,      self.unk_token						)





     def 							lowercase__      ( self		:					int	,      lowercase		:					int						):





        """simple docstring"""




        lowercase_			:Optional[Any]    			= []
        lowercase_			:Any    			= ""
        for token in tokens:
           # make sure that special tokens are not decoded using sentencepiece model
           if token in self.all_special_tokens:
              out_string += self.sp_model.decode(lowercase						) + token
              lowercase_			:str    			= []
           else:
              current_sub_tokens.append(lowercase						)
        out_string += self.sp_model.decode(lowercase						)
        return out_string.strip()





     def 							lowercase__      ( self		:					Any	,      lowercase		:					List[int]	,      lowercase		:					Optional[List[int]] = None	,      lowercase		:					bool = False						):





        """simple docstring"""




        if already_has_special_tokens:
           return super().get_special_tokens_mask(
               token_ids_a=lowercase	,      token_ids_a=lowercase	,      already_has_special_tokens=lowercase						)

        lowercase_			:List[Any]    			= [1] * len(self.prefix_tokens						)
        lowercase_			:List[Any]    			= [1] * len(self.suffix_tokens						)
        if token_ids_a is None:
           return prefix_ones + ([0] * len(lowercase						)) + suffix_ones
        return prefix_ones + ([0] * len(lowercase						)) + ([0] * len(lowercase						)) + suffix_ones





     def 							lowercase__      ( self		:					Union[str, Any]	,      lowercase		:					List[int]	,      lowercase		:					Optional[List[int]] = None						):





        """simple docstring"""




        if token_ids_a is None:
           return self.prefix_tokens + token_ids_a + self.suffix_tokens
        # We don't expect to process pairs, but leave the pair logic for API consistency
        return self.prefix_tokens + token_ids_a + token_ids_a + self.suffix_tokens





     def 							lowercase__      ( self		:					Union[str, Any]						):





        """simple docstring"""




        lowercase_			:str    			= {self.convert_ids_to_tokens(lowercase						): i for i in range(self.vocab_size						)}
        vocab.update(self.added_tokens_encoder						)
        return vocab





     def __getstate__( self		:					str						):





        """simple docstring"""




        lowercase_			:Any    			= self.__dict__.copy()
        lowercase_			:str    			= None
        return state





     def __setstate__( self		:					Tuple	,      lowercase		:					Dict						):





        """simple docstring"""




        lowercase_			:int    			= d

        # for backward compatibility
        if not hasattr(self	,      "sp_model_kwargs"						):
           lowercase_			:List[str]    			= {}

        lowercase_			:List[Any]    			= load_spm(self.spm_file	,      self.sp_model_kwargs						)





     def 							lowercase__      ( self		:					str	,      lowercase		:					str	,      lowercase		:					Optional[str] = None						):





        """simple docstring"""




        lowercase_			:Dict    			= Path(lowercase						)
        if not save_dir.is_dir():
           raise OSError(F'{save_directory} should be a directory'						)
        lowercase_			:Dict    			= save_dir / (
            (filename_prefix + "-" if filename_prefix else "") + self.vocab_files_names["vocab_file"]
        )
        lowercase_			:Dict    			= save_dir / (
            (filename_prefix + "-" if filename_prefix else "") + self.vocab_files_names["spm_file"]
        )

        save_json(self.encoder	,      lowercase						)

        if os.path.abspath(self.spm_file						) != os.path.abspath(lowercase						) and os.path.isfile(self.spm_file						):
           copyfile(self.spm_file	,      lowercase						)
        elif not os.path.isfile(self.spm_file						):
           with open(lowercase	,      "wb"						) as fi:
              lowercase_			:List[str]    			= self.sp_model.serialized_model_proto()
              fi.write(lowercase						)

        return (str(lowercase						), str(lowercase						))





     def 							lowercase__      ( self		:					List[str]	,      lowercase		:					List[str]	,      lowercase		:					str = "en"	,      lowercase		:					Optional[List[str]] = None	,      lowercase		:					str = "ro"	,      **lowercase		:					Optional[int]	,      ):





        """simple docstring"""




        lowercase_			:int    			= src_lang
        lowercase_			:Optional[int]    			= tgt_lang
        self.set_src_lang_special_tokens(self.src_lang						)
        return super().prepare_seqaseq_batch(lowercase	,      lowercase	,      **lowercase						)





     def 							lowercase__      ( self		:					List[Any]	,      lowercase		:					Any	,      lowercase		:					Optional[str]	,      lowercase		:					Optional[str]	,      **lowercase		:					Union[str, Any]						):





        """simple docstring"""




        if src_lang is None or tgt_lang is None:
           raise ValueError("Translation requires a `src_lang` and a `tgt_lang` for this model"						)
        lowercase_			:List[str]    			= src_lang
        lowercase_			:Union[str, Any]    			= self(lowercase	,      add_special_tokens=lowercase	,      **lowercase						)
        lowercase_			:str    			= self.get_lang_id(lowercase						)
        lowercase_			:Union[str, Any]    			= tgt_lang_id
        return inputs





     def 							lowercase__      ( self		:					str						):





        """simple docstring"""




        self.set_src_lang_special_tokens(self.src_lang						)





     def 							lowercase__      ( self		:					Tuple						):





        """simple docstring"""




        self.set_tgt_lang_special_tokens(self.tgt_lang						)





     def 							lowercase__      ( self		:					str	,      lowercase		:					str						):





        """simple docstring"""




        lowercase_			:List[str]    			= self.get_lang_token(lowercase						)
        lowercase_			:List[str]    			= self.lang_token_to_id[lang_token]
        lowercase_			:List[Any]    			= [self.cur_lang_id]
        lowercase_			:str    			= [self.eos_token_id]





     def 							lowercase__      ( self		:					str	,      lowercase		:					str						):





        """simple docstring"""




        lowercase_			:Optional[int]    			= self.get_lang_token(lowercase						)
        lowercase_			:Tuple    			= self.lang_token_to_id[lang_token]
        lowercase_			:Dict    			= [self.cur_lang_id]
        lowercase_			:List[Any]    			= [self.eos_token_id]





     def 							lowercase__      ( self		:					Union[str, Any]	,      lowercase		:					str						):





        """simple docstring"""




        return self.lang_code_to_token[lang]







     def 							lowercase__      ( self		:					Dict	,      lowercase		:					str						):





        """simple docstring"""




        lowercase_			:Union[str, Any]    			= self.get_lang_token(lowercase						)
        return self.lang_token_to_id[lang_token]







def 							UpperCAmelCase_  (						__lowerCamelCase					:					str	,__lowerCamelCase					:					Dict[str, Any] ):
   lowercase_			:List[str]    			= sentencepiece.SentencePieceProcessor(**__lowerCamelCase )
   spm.Load(str(__lowerCamelCase ) )
   return spm
def 							UpperCAmelCase_  (						__lowerCamelCase					:					str ):
   with open(__lowerCamelCase	,"r" ) as f:
      return json.load(__lowerCamelCase )


def 							UpperCAmelCase_  (						__lowerCamelCase					:					int	,__lowerCamelCase					:					str ):
   with open(__lowerCamelCase	,"w" ) as f:
      json.dump(__lowerCamelCase	,__lowerCamelCase	,indent=2 )


