
'''simple docstring'''





import json
from typing import List, Optional, Tuple

from tokenizers import normalizers

from ...tokenization_utils_fast import PreTrainedTokenizerFast
from ...utils import logging
from .tokenization_funnel import FunnelTokenizer


UpperCAmelCase    					=   logging.get_logger(__name__)

UpperCAmelCase    					=   {'vocab_file': 'vocab.txt', 'tokenizer_file': 'tokenizer.json'}

UpperCAmelCase    					=   [
    'small',
    'small-base',
    'medium',
    'medium-base',
    'intermediate',
    'intermediate-base',
    'large',
    'large-base',
    'xlarge',
    'xlarge-base',
]

UpperCAmelCase    					=   {
    'vocab_file': {
        'funnel-transformer/small': 'https://huggingface.co/funnel-transformer/small/resolve/main/vocab.txt',
        'funnel-transformer/small-base': 'https://huggingface.co/funnel-transformer/small-base/resolve/main/vocab.txt',
        'funnel-transformer/medium': 'https://huggingface.co/funnel-transformer/medium/resolve/main/vocab.txt',
        'funnel-transformer/medium-base': (
            'https://huggingface.co/funnel-transformer/medium-base/resolve/main/vocab.txt'
        ),
        'funnel-transformer/intermediate': (
            'https://huggingface.co/funnel-transformer/intermediate/resolve/main/vocab.txt'
        ),
        'funnel-transformer/intermediate-base': (
            'https://huggingface.co/funnel-transformer/intermediate-base/resolve/main/vocab.txt'
        ),
        'funnel-transformer/large': 'https://huggingface.co/funnel-transformer/large/resolve/main/vocab.txt',
        'funnel-transformer/large-base': 'https://huggingface.co/funnel-transformer/large-base/resolve/main/vocab.txt',
        'funnel-transformer/xlarge': 'https://huggingface.co/funnel-transformer/xlarge/resolve/main/vocab.txt',
        'funnel-transformer/xlarge-base': (
            'https://huggingface.co/funnel-transformer/xlarge-base/resolve/main/vocab.txt'
        ),
    },
    'tokenizer_file': {
        'funnel-transformer/small': 'https://huggingface.co/funnel-transformer/small/resolve/main/tokenizer.json',
        'funnel-transformer/small-base': (
            'https://huggingface.co/funnel-transformer/small-base/resolve/main/tokenizer.json'
        ),
        'funnel-transformer/medium': 'https://huggingface.co/funnel-transformer/medium/resolve/main/tokenizer.json',
        'funnel-transformer/medium-base': (
            'https://huggingface.co/funnel-transformer/medium-base/resolve/main/tokenizer.json'
        ),
        'funnel-transformer/intermediate': (
            'https://huggingface.co/funnel-transformer/intermediate/resolve/main/tokenizer.json'
        ),
        'funnel-transformer/intermediate-base': (
            'https://huggingface.co/funnel-transformer/intermediate-base/resolve/main/tokenizer.json'
        ),
        'funnel-transformer/large': 'https://huggingface.co/funnel-transformer/large/resolve/main/tokenizer.json',
        'funnel-transformer/large-base': (
            'https://huggingface.co/funnel-transformer/large-base/resolve/main/tokenizer.json'
        ),
        'funnel-transformer/xlarge': 'https://huggingface.co/funnel-transformer/xlarge/resolve/main/tokenizer.json',
        'funnel-transformer/xlarge-base': (
            'https://huggingface.co/funnel-transformer/xlarge-base/resolve/main/tokenizer.json'
        ),
    },
}
UpperCAmelCase    					=   {f'''funnel-transformer/{name}''': 512 for name in _model_names}
UpperCAmelCase    					=   {f'''funnel-transformer/{name}''': {'do_lower_case': True} for name in _model_names}

class 						a   (				SCREAMING_SNAKE_CASE_    ):
    _snake_case		    = VOCAB_FILES_NAMES
    _snake_case		    = PRETRAINED_VOCAB_FILES_MAP
    _snake_case		    = PRETRAINED_INIT_CONFIGURATION
    _snake_case		    = FunnelTokenizer
    _snake_case		    = PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
    _snake_case		    = 2




    def __init__(							self	:				Dict,    SCREAMING_SNAKE_CASE_	:				Optional[Any]=None,    SCREAMING_SNAKE_CASE_	:				Dict=None,    SCREAMING_SNAKE_CASE_	:				List[Any]=True,    SCREAMING_SNAKE_CASE_	:				List[str]="<unk>",    SCREAMING_SNAKE_CASE_	:				str="<sep>",    SCREAMING_SNAKE_CASE_	:				int="<pad>",    SCREAMING_SNAKE_CASE_	:				Dict="<cls>",    SCREAMING_SNAKE_CASE_	:				List[str]="<mask>",    SCREAMING_SNAKE_CASE_	:				Any="<s>",    SCREAMING_SNAKE_CASE_	:				List[Any]="</s>",    SCREAMING_SNAKE_CASE_	:				List[Any]=True,    SCREAMING_SNAKE_CASE_	:				int=True,    SCREAMING_SNAKE_CASE_	:				Optional[int]=None,    SCREAMING_SNAKE_CASE_	:				str="##",    **SCREAMING_SNAKE_CASE_	:				Optional[int],    ):
          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__,    bos_token=UpperCamelCase__,    eos_token=UpperCamelCase__,    clean_text=UpperCamelCase__,    tokenize_chinese_chars=UpperCamelCase__,    strip_accents=UpperCamelCase__,    wordpieces_prefix=UpperCamelCase__,    **UpperCamelCase__,    )

          snake_case       :     Dict =    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
          ):
                snake_case       :     Tuple =    getattr(UpperCamelCase__,    normalizer_state.pop('''type'''      )      )
                snake_case       :     int =    do_lower_case
                snake_case       :     Tuple =    strip_accents
                snake_case       :     Any =    tokenize_chinese_chars
                snake_case       :     Dict =    normalizer_class(**UpperCamelCase__      )

          snake_case       :     Union[str, Any] =    do_lower_case




    def 	__snake_case							(							self	:				Optional[int],    SCREAMING_SNAKE_CASE_	:				Optional[int],    SCREAMING_SNAKE_CASE_	:				Union[str, Any]=None      ):
          snake_case       :     List[str] =    [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	:				Dict,    SCREAMING_SNAKE_CASE_	:				Optional[int],    SCREAMING_SNAKE_CASE_	:				str = None      ):
          snake_case       :     int =    [self.sep_token_id]
          snake_case       :     Optional[int] =    [self.cls_token_id]
          if token_ids_a is None:
                return len(cls      ) * [self.cls_token_type_id] + len(token_ids_a + sep      ) * [0]
          return len(cls      ) * [self.cls_token_type_id] + len(token_ids_a + sep      ) * [0] + len(token_ids_a + sep      ) * [1]




    def 	__snake_case							(							self	:				int,    SCREAMING_SNAKE_CASE_	:				str,    SCREAMING_SNAKE_CASE_	:				List[Any] = None      ):
          snake_case       :     Tuple =    self._tokenizer.model.save(UpperCamelCase__,    name=UpperCamelCase__      )
          return tuple(UpperCamelCase__      )



'''simple docstring'''





from __future__ import annotations

def      A (       A_							:					list[int]    ,							A_							:					int       ):
						snake_case       :     list[list[int]] =    []
						snake_case       :     list[int] =    []
						snake_case       :     int =    0
						snake_case       :     int =    sum(A_       )
						create_state_space_tree(A_    ,							A_    ,							A_    ,							A_    ,							A_    ,							A_       )
						return result

def      A (       A_							:					list[int]    ,							A_							:					int    ,							A_							:					int    ,							A_							:					list[int]    ,							A_							:					list[list[int]]    ,							A_							:					int    ,							):
						if sum(A_       ) > max_sum or (remaining_nums_sum + sum(A_       )) < max_sum:
												return
						if sum(A_       ) == max_sum:
												result.append(A_       )
												return
						for index in range(A_    ,							len(A_       )       ):
												create_state_space_tree(
												    A_    ,							A_    ,							index + 1    ,							[*path, nums[index]]    ,							A_    ,							remaining_nums_sum - nums[index]    ,							)
UpperCAmelCase    					=   [3, 34, 4, 12, 5, 2]
UpperCAmelCase    					=   9
UpperCAmelCase    					=   generate_sum_of_subsets_soln(nums, max_sum)





print(*result)

