






from math import sqrt
def 						_a    (      a :int )							->			bool:
 assert isinstance(a	,							a ) and (
     number >= 0
 ), "'number' must been an int and positive"

 a		  =      True

 # 0 and 1 are none primes.
 if number <= 1:
  a		  =      False

 for divisor in range(2	,							int(round(sqrt(a ) ) ) + 1 ):
  # if 'number' divisible by 'divisor' then sets 'status'
  # of false and break up the loop.
  if number % divisor == 0:
   a		  =      False
   break

    # precondition
 assert isinstance(a	,							a ), "'status' must been from type bool"

 return status
def 						_a    (      a :Tuple )							->			str:
 assert isinstance(a	,							a ) and (n > 2), "'N' must been an int and > 2"

 # beginList: contains all natural numbers from 2 up to N
 a		  =      list(range(2	,							n + 1 ) )

 a		  =      []  # this list will be returns.

 # actual sieve of erathostenes
 for i in range(len(a ) ):
  for j in range(i + 1	,							len(a ) ):
   if (begin_list[i] != 0) and (begin_list[j] % begin_list[i] == 0):
    a		  =      0

    # filters actual prime numbers.
 a		  =      [x for x in begin_list if x != 0]

 # precondition
 assert isinstance(a	,							a ), "'ans' must been from type list"

 return ans
def 						_a    (      a :Optional[Any] )							->			Optional[Any]:
 assert isinstance(a	,							a ) and (n > 2), "'N' must been an int and > 2"

 a		  =      []

 # iterates over all numbers between 2 up to N+1
 # if a number is prime then appends to list 'ans'
 for number in range(2	,							n + 1 ):
  if is_prime(a ):
   ans.append(a )

    # precondition
 assert isinstance(a	,							a ), "'ans' must been from type list"

 return ans
def 						_a    (      a :Dict )							->			str:
 assert isinstance(a	,							a ) and number >= 0, "'number' must been an int and >= 0"

 a		  =      []  # this list will be returns of the function.

 # potential prime number factors.

 a		  =      2

 a		  =      number

 if number == 0 or number == 1:
  ans.append(a )

 # if 'number' not prime then builds the prime factorization of 'number'
 elif not is_prime(a ):
  while quotient != 1:
   if is_prime(a ) and (quotient % factor == 0):
    ans.append(a )
    quotient /= factor
   else:
    factor += 1

 else:
  ans.append(a )

 # precondition
 assert isinstance(a	,							a ), "'ans' must been from type list"

 return ans
def 						_a    (      a :List[str] )							->			Union[str, Any]:
 assert isinstance(a	,							a ) and (
     number >= 0
 ), "'number' bust been an int and >= 0"

 a		  =      0

 # prime factorization of 'number'
 a		  =      prime_factorization(a )

 a		  =      max(a )

 # precondition
 assert isinstance(a	,							a ), "'ans' must been from type int"

 return ans
def 						_a    (      a :Optional[int] )							->			List[str]:
 assert isinstance(a	,							a ) and (
     number >= 0
 ), "'number' bust been an int and >= 0"

 a		  =      0

 # prime factorization of 'number'
 a		  =      prime_factorization(a )

 a		  =      min(a )

 # precondition
 assert isinstance(a	,							a ), "'ans' must been from type int"

 return ans
def 						_a    (      a :Any )							->			Any:
 assert isinstance(a	,							a ), "'number' must been an int"
 assert isinstance(number % 2 == 0	,							a ), "compare bust been from type bool"

 return number % 2 == 0
def 						_a    (      a :Any )							->			int:
 assert isinstance(a	,							a ), "'number' must been an int"
 assert isinstance(number % 2 != 0	,							a ), "compare bust been from type bool"

 return number % 2 != 0
def 						_a    (      a :Union[str, Any] )							->			Tuple:
 assert (
     isinstance(a	,							a ) and (number > 2) and is_even(a )
 ), "'number' must been an int, even and > 2"

 a		  =      []  # this list will returned

 # creates a list of prime numbers between 2 up to 'number'
 a		  =      get_prime_numbers(a )
 a		  =      len(a )

 # run variable for while-loops.
 a		  =      0
 a		  =      None

 # exit variable. for break up the loops
 a		  =      True

 while i < len_pn and loop:
  a		  =      i + 1

  while j < len_pn and loop:
   if prime_numbers[i] + prime_numbers[j] == number:
    a		  =      False
    ans.append(prime_numbers[i] )
    ans.append(prime_numbers[j] )

   j += 1

  i += 1

 # precondition
 assert (
     isinstance(a	,							a )
     and (len(a ) == 2)
     and (ans[0] + ans[1] == number)
     and is_prime(ans[0] )
     and is_prime(ans[1] )
 ), "'ans' must contains two primes. And sum of elements must been eq 'number'"

 return ans
def 						_a    (      a :Dict	,							a :int )							->			Dict:
 assert (
     isinstance(a	,							a )
     and isinstance(a	,							a )
     and (numbera >= 0)
     and (numbera >= 0)
 ), "'number1' and 'number2' must been positive integer."

 a		  =      0

 while numbera != 0:
  a		  =      numbera % numbera
  a		  =      numbera
  a		  =      rest

 # precondition
 assert isinstance(a	,							a ) and (
     numbera >= 0
 ), "'number' must been from type int and positive"

 return numbera
def 						_a    (      a :str	,							a :str )							->			str:
 assert (
     isinstance(a	,							a )
     and isinstance(a	,							a )
     and (numbera >= 1)
     and (numbera >= 1)
 ), "'number1' and 'number2' must been positive integer."

 a		  =      1  # actual answer that will be return.

 # for kgV (x,1)
 if numbera > 1 and numbera > 1:
  # builds the prime factorization of 'number1' and 'number2'
  a		  =      prime_factorization(a )
  a		  =      prime_factorization(a )

 elif numbera == 1 or numbera == 1:
  a		  =      []
  a		  =      []
  a		  =      max(a	,							a )

 a		  =      0
 a		  =      0

 a		  =      []  # captured numbers int both 'primeFac1' and 'primeFac2'

 # iterates through primeFac1
 for n in prime_fac_a:
  if n not in done:
   if n in prime_fac_a:
    a		  =      prime_fac_a.count(a )
    a		  =      prime_fac_a.count(a )

    for _ in range(max(a	,							a ) ):
     ans *= n

   else:
    a		  =      prime_fac_a.count(a )

    for _ in range(a ):
     ans *= n

   done.append(a )

    # iterates through primeFac2
 for n in prime_fac_a:
  if n not in done:
   a		  =      prime_fac_a.count(a )

   for _ in range(a ):
    ans *= n

   done.append(a )

    # precondition
 assert isinstance(a	,							a ) and (
     ans >= 0
 ), "'ans' must been from type int and positive"

 return ans
def 						_a    (      a :int )							->			Any:
 assert isinstance(a	,							a ) and (n >= 0), "'number' must been a positive int"

 a		  =      0
 a		  =      2  # this variable holds the answer

 while index < n:
  index += 1

  ans += 1  # counts to the next number

  # if ans not prime then
  # runs to the next prime number.
  while not is_prime(a ):
   ans += 1

    # precondition
 assert isinstance(a	,							a ) and is_prime(
     a ), "'ans' must been a prime number and from type int"

 return ans
def 						_a    (      a :Optional[Any]	,							a :Optional[int] )							->			List[Any]:
 assert (
     is_prime(a ) and is_prime(a ) and (p_number_a < p_number_a)
 ), "The arguments must been prime numbers and 'pNumber1' < 'pNumber2'"

 a		  =      p_number_a + 1  # jump to the next number

 a		  =      []  # this list will be returns.

 # if number is not prime then
 # fetch the next prime number.
 while not is_prime(a ):
  number += 1

 while number < p_number_a:
  ans.append(a )

  number += 1

  # fetch the next prime number.
  while not is_prime(a ):
   number += 1

    # precondition
 assert (
     isinstance(a	,							a )
     and ans[0] != p_number_a
     and ans[len(a ) - 1] != p_number_a
 ), "'ans' must been a list without the arguments"

 # 'ans' contains not 'pNumber1' and 'pNumber2' !
 return ans
def 						_a    (      a :Optional[Any] )							->			Optional[Any]:
 assert isinstance(a	,							a ) and (n >= 1), "'n' must been int and >= 1"

 a		  =      []  # will be returned.

 for divisor in range(1	,							n + 1 ):
  if n % divisor == 0:
   ans.append(a )

    # precondition
 assert ans[0] == 1 and ans[len(a ) - 1] == n, "Error in function getDivisiors(...)"

 return ans
def 						_a    (      a :List[Any] )							->			Optional[Any]:
 assert isinstance(a	,							a ) and (
     number > 1
 ), "'number' must been an int and >= 1"

 a		  =      get_divisors(a )

 # precondition
 assert (
     isinstance(a	,							a )
     and (divisors[0] == 1)
     and (divisors[len(a ) - 1] == number)
 ), "Error in help-function getDivisiors(...)"

 # summed all divisors up to 'number' (exclusive), hence [:-1]
 return sum(divisors[:-1] ) == number
def 						_a    (      a :Optional[int]	,							a :Optional[int] )							->			Dict:
 assert (
     isinstance(a	,							a )
     and isinstance(a	,							a )
     and (denominator != 0)
 ), "The arguments must been from type int and 'denominator' != 0"

 # build the greatest common divisor of numerator and denominator.
 a		  =      gcd(abs(a )	,							abs(a ) )

 # precondition
 assert (
     isinstance(a	,							a )
     and (numerator % gcd_of_fraction == 0)
     and (denominator % gcd_of_fraction == 0)
 ), "Error in function gcd(...,...)"

 return (numerator // gcd_of_fraction, denominator // gcd_of_fraction)
def 						_a    (      a :str )							->			str:
 assert isinstance(a	,							a ) and (n >= 0), "'n' must been a int and >= 0"

 a		  =      1  # this will be return.

 for factor in range(1	,							n + 1 ):
  ans *= factor

 return ans

def 						_a    (      a :List[str] )							->			Optional[Any]:
 assert isinstance(a	,							a ) and (n >= 0), "'n' must been an int and >= 0"

 a		  =      0
 a		  =      1
 a		  =      1  # this will be return

 for _ in range(n - 1 ):
  a		  =      ans
  ans += fiba
  a		  =      tmp

 return ans










import json
from typing import List, Optional, Tuple

from tokenizers import normalizers

from ...tokenization_utils_fast import PreTrainedTokenizerFast
from .tokenization_electra import ElectraTokenizer


UpperCAmelCase__				   =		{"vocab_file": "vocab.txt", "tokenizer_file": "tokenizer.json"}

UpperCAmelCase__				   =		{
    "vocab_file": {
        "google/electra-small-generator": (
            "https://huggingface.co/google/electra-small-generator/resolve/main/vocab.txt"
        ),
        "google/electra-base-generator": "https://huggingface.co/google/electra-base-generator/resolve/main/vocab.txt",
        "google/electra-large-generator": (
            "https://huggingface.co/google/electra-large-generator/resolve/main/vocab.txt"
        ),
        "google/electra-small-discriminator": (
            "https://huggingface.co/google/electra-small-discriminator/resolve/main/vocab.txt"
        ),
        "google/electra-base-discriminator": (
            "https://huggingface.co/google/electra-base-discriminator/resolve/main/vocab.txt"
        ),
        "google/electra-large-discriminator": (
            "https://huggingface.co/google/electra-large-discriminator/resolve/main/vocab.txt"
        ),
    },
    "tokenizer_file": {
        "google/electra-small-generator": (
            "https://huggingface.co/google/electra-small-generator/resolve/main/tokenizer.json"
        ),
        "google/electra-base-generator": (
            "https://huggingface.co/google/electra-base-generator/resolve/main/tokenizer.json"
        ),
        "google/electra-large-generator": (
            "https://huggingface.co/google/electra-large-generator/resolve/main/tokenizer.json"
        ),
        "google/electra-small-discriminator": (
            "https://huggingface.co/google/electra-small-discriminator/resolve/main/tokenizer.json"
        ),
        "google/electra-base-discriminator": (
            "https://huggingface.co/google/electra-base-discriminator/resolve/main/tokenizer.json"
        ),
        "google/electra-large-discriminator": (
            "https://huggingface.co/google/electra-large-discriminator/resolve/main/tokenizer.json"
        ),
    },
}

UpperCAmelCase__				   =		{
    "google/electra-small-generator": 512,
    "google/electra-base-generator": 512,
    "google/electra-large-generator": 512,
    "google/electra-small-discriminator": 512,
    "google/electra-base-discriminator": 512,
    "google/electra-large-discriminator": 512,
}

UpperCAmelCase__				   =		{
    "google/electra-small-generator": {"do_lower_case": True},
    "google/electra-base-generator": {"do_lower_case": True},
    "google/electra-large-generator": {"do_lower_case": True},
    "google/electra-small-discriminator": {"do_lower_case": True},
    "google/electra-base-discriminator": {"do_lower_case": True},
    "google/electra-large-discriminator": {"do_lower_case": True},
}






class 		lowercase_					(	lowercase   ):






      '''simple docstring'''




      __snake_case       =  VOCAB_FILES_NAMES
      __snake_case       =  PRETRAINED_VOCAB_FILES_MAP
      __snake_case       =  PRETRAINED_INIT_CONFIGURATION
      __snake_case       =  PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
      __snake_case       =  ElectraTokenizer







      def __init__(      self      :						Dict ,					__UpperCAmelCase      :						int=None ,					__UpperCAmelCase      :						str=None ,					__UpperCAmelCase      :						Optional[int]=True ,					__UpperCAmelCase      :						str="[UNK]" ,					__UpperCAmelCase      :						Any="[SEP]" ,					__UpperCAmelCase      :						str="[PAD]" ,					__UpperCAmelCase      :						Optional[Any]="[CLS]" ,					__UpperCAmelCase      :						Union[str, Any]="[MASK]" ,					__UpperCAmelCase      :						List[str]=True ,					__UpperCAmelCase      :						Tuple=None ,					**__UpperCAmelCase      :						Optional[int] ,					)    ->str:




       """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 ,					)

       a		  =      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
       ):
        a		  =      getattr(__UpperCAmelCase ,					normalizer_state.pop('''type'''  )  )
        a		  =      do_lower_case
        a		  =      strip_accents
        a		  =      tokenize_chinese_chars
        a		  =      normalizer_class(**__UpperCAmelCase  )

       a		  =      do_lower_case







      def       __lowerCAmelCase					(      self      :						List[Any] ,					__UpperCAmelCase      :						Optional[int] ,					__UpperCAmelCase      :						Tuple=None  )    ->str:




       """simple docstring"""


       a		  =      [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       __lowerCAmelCase					(      self      :						Optional[Any] ,					__UpperCAmelCase      :						List[int] ,					__UpperCAmelCase      :						Optional[List[int]] = None  )    ->List[int]:




       """simple docstring"""


       a		  =      [self.sep_token_id]
       a		  =      [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       __lowerCAmelCase					(      self      :						List[str] ,					__UpperCAmelCase      :						str ,					__UpperCAmelCase      :						Optional[str] = None  )    ->Tuple[str]:




       """simple docstring"""


       a		  =      self._tokenizer.model.save(__UpperCAmelCase ,					name=__UpperCAmelCase  )
       return tuple(__UpperCAmelCase  )


