code: 
  
  
  
  
  
  from arguments import TokenizerTrainingArguments
  from datasets import load_dataset
  from tqdm import tqdm
  
  from transformers import AutoTokenizer, HfArgumentParser
  from transformers.models.gpta.tokenization_gpta import bytes_to_unicode
  
  
  
  
  
  
  
  def       lowerCAmelCase__(	lowercase       :    Union[str, Any]=10				) ->    Any:
    for _ in tqdm(range(0   ,     args.n_examples   ,     lowercase				)				):
      yield [next(lowercase				)[args.text_column] for _ in range(lowercase				)]
  
  
  # Configuration
  _UpperCamelCase       = HfArgumentParser(TokenizerTrainingArguments)
  _UpperCamelCase       = parser.parse_args()
  
  # Base tokenizer
  _UpperCamelCase       = AutoTokenizer.from_pretrained(args.base_tokenizer)
  _UpperCamelCase       = list(bytes_to_unicode().values())
  
  # Load dataset
  _UpperCamelCase       = load_dataset(args.dataset_name, split='''train''', streaming=True)
  _UpperCamelCase       = iter(dataset)
  
  
  # Training and saving
  _UpperCamelCase       = tokenizer.train_new_from_iterator(
      batch_iterator(), vocab_size=args.vocab_size, initial_alphabet=base_vocab
  )
  
  
  
  
  new_tokenizer.save_pretrained(args.tokenizer_name, push_to_hub=args.push_to_hub)
  
  
style_context: 
  
  
  
  
  
  def       lowerCAmelCase__(	lowercase       :    str				) ->    int:
    __snake_case   :				List[str]        =       str(lowercase				).strip()
    if not oct_string:
      raise ValueError("Empty string was passed to the function"				)
    __snake_case   :				int        =       oct_string[0] == "-"
    if is_negative:
      __snake_case   :				Union[str, Any]        =       oct_string[1:]
    if not oct_string.isdigit() or not all(0 <= int(lowercase				) <= 7 for char in oct_string				):
      raise ValueError("Non-octal value was passed to the function"				)
    __snake_case   :				List[Any]        =       0
    for char in oct_string:
      __snake_case   :				Optional[Any]        =       8 * decimal_number + int(lowercase				)
    if is_negative:
      __snake_case   :				Any        =       -decimal_number
    return decimal_number
  
  
  if __name__ == "__main__":
       from doctest import testmod
  
       testmod()
  
  