


'''simple docstring'''

import json
from typing import List, Optional, Tuple

from tokenizers import normalizers

from ...tokenization_utils_fast import PreTrainedTokenizerFast
from .tokenization_lxmert import LxmertTokenizer


a_  :				Optional[Any]						= {"""vocab_file""": """vocab.txt""", """tokenizer_file""": """tokenizer.json"""}

a_  :				Optional[int]						= {
    """vocab_file""": {
        """unc-nlp/lxmert-base-uncased""": """https://huggingface.co/unc-nlp/lxmert-base-uncased/resolve/main/vocab.txt""",
    },
    """tokenizer_file""": {
        """unc-nlp/lxmert-base-uncased""": (
            """https://huggingface.co/unc-nlp/lxmert-base-uncased/resolve/main/tokenizer.json"""
        ),
    },
}

a_  :				Dict						= {
    """unc-nlp/lxmert-base-uncased""": 512,
}

a_  :				Optional[int]						= {
    """unc-nlp/lxmert-base-uncased""": {"""do_lower_case""": True},
}





class      snake_case    (    lowercase			):





  """simple docstring"""




  _lowerCamelCase		    =  VOCAB_FILES_NAMES
  _lowerCamelCase		    =  PRETRAINED_VOCAB_FILES_MAP
  _lowerCamelCase		    =  PRETRAINED_INIT_CONFIGURATION
  _lowerCamelCase		    =  PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
  _lowerCamelCase		    =  LxmertTokenizer






  def __init__(    self			,  UpperCamelCase=None			,  UpperCamelCase=None			,  UpperCamelCase=True			,  UpperCamelCase="[UNK]"			,  UpperCamelCase="[SEP]"			,  UpperCamelCase="[PAD]"			,  UpperCamelCase="[CLS]"			,  UpperCamelCase="[MASK]"			,  UpperCamelCase=True			,  UpperCamelCase=None			,  **UpperCamelCase			,  ):







   """simple docstring"""
   super().__init__(
       UpperCamelCase			,  tokenizer_file=UpperCamelCase			,  do_lower_case=UpperCamelCase			,  unk_token=UpperCamelCase			,  sep_token=UpperCamelCase			,  pad_token=UpperCamelCase			,  cls_token=UpperCamelCase			,  mask_token=UpperCamelCase			,  tokenize_chinese_chars=UpperCamelCase			,  strip_accents=UpperCamelCase			,  **UpperCamelCase			,  )

   lowerCamelCase_      =  json.loads(self.backend_tokenizer.normalizer.__getstate__()     )
   if (
       normalizer_state.get("lowercase"			,  UpperCamelCase     ) != do_lower_case
       or normalizer_state.get("strip_accents"			,  UpperCamelCase     ) != strip_accents
       or normalizer_state.get("handle_chinese_chars"			,  UpperCamelCase     ) != tokenize_chinese_chars
   ):
    lowerCamelCase_      =  getattr(UpperCamelCase			,  normalizer_state.pop("type"     )     )
    lowerCamelCase_      =  do_lower_case
    lowerCamelCase_      =  strip_accents
    lowerCamelCase_      =  tokenize_chinese_chars
    lowerCamelCase_      =  normalizer_class(**UpperCamelCase     )

   lowerCamelCase_      =  do_lower_case






  def   snake_case		(    self			,  UpperCamelCase			,  UpperCamelCase=None     ):







   """simple docstring"""
   lowerCamelCase_      =  [self.cls_token_id] + token_ids_a + [self.sep_token_id]

   if token_ids_a:
    output += token_ids_a + [self.sep_token_id]

   return output






  def   snake_case		(    self			,  UpperCamelCase			,  UpperCamelCase = None     ):







   """simple docstring"""
   lowerCamelCase_      =  [self.sep_token_id]
   lowerCamelCase_      =  [self.cls_token_id]
   if token_ids_a is None:
    return len(cls + token_ids_a + sep     ) * [0]
   return len(cls + token_ids_a + sep     ) * [0] + len(token_ids_a + sep     ) * [1]







  def   snake_case		(    self			,  UpperCamelCase			,  UpperCamelCase = None     ):







   """simple docstring"""
   lowerCamelCase_      =  self._tokenizer.model.save(UpperCamelCase			,  name=UpperCamelCase     )
   return tuple(UpperCamelCase     )







'''simple docstring'''

from __future__ import annotations

from fractions import Fraction





def __snake_case					(      UpperCAmelCase_						:						int					,				UpperCAmelCase_						:						int		):
 return (
     num != den and num % 10 == den // 10 and (num // 10) / (den % 10) == num / den
 )





def __snake_case					(      UpperCAmelCase_						:						int		):
 lowerCamelCase_      =  []
 lowerCamelCase_      =  11
 lowerCamelCase_      =  int("1" + "0" * digit_len		)
 for num in range(UpperCAmelCase_					,				UpperCAmelCase_		):
  while den <= 99:
   if (num != den) and (num % 10 == den // 10) and (den % 10 != 0):
    if is_digit_cancelling(UpperCAmelCase_					,				UpperCAmelCase_		):
     solutions.append(F'''{num}/{den}'''		)
   den += 1
  num += 1
  lowerCamelCase_      =  10
 return solutions





def __snake_case					(      UpperCAmelCase_						:						int = 2		):
 lowerCamelCase_      =  1.0
 for fraction in fraction_list(UpperCAmelCase_		):
  lowerCamelCase_      =  Fraction(UpperCAmelCase_		)
  result *= frac.denominator / frac.numerator
 return int(UpperCAmelCase_		)


if __name__ == "__main__":
     print(solution())



