






"""simple docstring"""



import json
import os
from functools import lru_cache
from typing import Dict, List, Optional, Tuple, Union

import regex as re

from ...tokenization_utils import AddedToken, PreTrainedTokenizer
from ...tokenization_utils_base import BatchEncoding, EncodedInput
from ...utils import PaddingStrategy, logging


A_    =							logging.get_logger(__name__)


A_    =							{'''vocab_file''': '''vocab.json''', '''merges_file''': '''merges.txt'''}

# See all LED models at https://huggingface.co/models?filter=LED
A_    =							{
    '''vocab_file''': {
        '''allenai/led-base-16384''': '''https://huggingface.co/allenai/led-base-16384/resolve/main/vocab.json''',
    },
    '''merges_file''': {
        '''allenai/led-base-16384''': '''https://huggingface.co/allenai/led-base-16384/resolve/main/merges.txt''',
    },
    '''tokenizer_file''': {
        '''allenai/led-base-16384''': '''https://huggingface.co/allenai/led-base-16384/resolve/main/tokenizer.json''',
    },
}

A_    =							{
    '''allenai/led-base-16384''': 1_6384,
}




@lru_cache()
# Copied from transformers.models.bart.tokenization_bart.bytes_to_unicode
def      _lowerCAmelCase		(							)		->Optional[int]:
						A__						:  Dict		  =  (
						    list(range(ord("""!"""      ),						ord("""~"""      ) + 1      )      ) + list(range(ord("""¡"""      ),						ord("""¬"""      ) + 1      )      ) + list(range(ord("""®"""      ),						ord("""ÿ"""      ) + 1      )      )
						)
						A__						:  Union[str, Any]		  =  bs[:]
						A__						:  Optional[Any]		  =  0
						for b in range(2**8      ):
												if b not in bs:
																		bs.append(UpperCAmelCase__      )
																		cs.append(2**8 + n      )
																		n += 1
						A__						:  Union[str, Any]		  =  [chr(UpperCAmelCase__      ) for n in cs]
						return dict(zip(UpperCAmelCase__,						UpperCAmelCase__      )      )




def      _lowerCAmelCase		(							UpperCAmelCase__       :					Union[str, Any]      )		->Dict:
						A__						:  List[Any]		  =  set()
						A__						:  Union[str, Any]		  =  word[0]
						for char in word[1:]:
												pairs.add((prev_char, char)      )
												A__						:  Any		  =  char
						return pairs






class 							__SCREAMING_SNAKE_CASE						(				UpperCamelCase		):
							snake_case_     =							VOCAB_FILES_NAMES
							snake_case_     =							PRETRAINED_VOCAB_FILES_MAP
							snake_case_     =							PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
							snake_case_     =							['input_ids', 'attention_mask']


							def __init__(			self      :						Any			,    snake_case      :						List[Any]			,    snake_case      :						int			,    snake_case      :						str="replace"			,    snake_case      :						Tuple="<s>"			,    snake_case      :						Optional[Any]="</s>"			,    snake_case      :						Dict="</s>"			,    snake_case      :						int="<s>"			,    snake_case      :						Optional[int]="<unk>"			,    snake_case      :						str="<pad>"			,    snake_case      :						Union[str, Any]="<mask>"			,    snake_case      :						Union[str, Any]=False			,    **snake_case      :						Optional[int]			,    ):
													'''simple docstring'''





													A__						:  Optional[int]		  =  AddedToken(snake_case			,    lstrip=snake_case			,    rstrip=snake_case							) if isinstance(snake_case			,    snake_case							) else bos_token
													A__						:  int		  =  AddedToken(snake_case			,    lstrip=snake_case			,    rstrip=snake_case							) if isinstance(snake_case			,    snake_case							) else eos_token
													A__						:  List[Any]		  =  AddedToken(snake_case			,    lstrip=snake_case			,    rstrip=snake_case							) if isinstance(snake_case			,    snake_case							) else sep_token
													A__						:  Optional[Any]		  =  AddedToken(snake_case			,    lstrip=snake_case			,    rstrip=snake_case							) if isinstance(snake_case			,    snake_case							) else cls_token
													A__						:  int		  =  AddedToken(snake_case			,    lstrip=snake_case			,    rstrip=snake_case							) if isinstance(snake_case			,    snake_case							) else unk_token
													A__						:  Tuple		  =  AddedToken(snake_case			,    lstrip=snake_case			,    rstrip=snake_case							) if isinstance(snake_case			,    snake_case							) else pad_token

													# Mask token behave like a normal word, i.e. include the space before it
													A__						:  List[str]		  =  AddedToken(snake_case			,    lstrip=snake_case			,    rstrip=snake_case							) if isinstance(snake_case			,    snake_case							) else mask_token

													super().__init__(
													    errors=snake_case			,    bos_token=snake_case			,    eos_token=snake_case			,    unk_token=snake_case			,    sep_token=snake_case			,    cls_token=snake_case			,    pad_token=snake_case			,    mask_token=snake_case			,    add_prefix_space=snake_case			,    **snake_case			,    )

													with open(snake_case			,    encoding="""utf-8"""							) as vocab_handle:
																			A__						:  int		  =  json.load(snake_case							)
													A__						:  Union[str, Any]		  =  {v: k for k, v in self.encoder.items()}
													A__						:  Optional[Any]		  =  errors  # how to handle errors in decoding
													A__						:  Union[str, Any]		  =  bytes_to_unicode()
													A__						:  Dict		  =  {v: k for k, v in self.byte_encoder.items()}
													with open(snake_case			,    encoding="""utf-8"""							) as merges_handle:
																			A__						:  Dict		  =  merges_handle.read().split("""\n"""							)[1:-1]
													A__						:  int		  =  [tuple(merge.split()							) for merge in bpe_merges]
													A__						:  List[str]		  =  dict(zip(snake_case			,    range(len(snake_case							)							)							)							)
													A__						:  Dict		  =  {}
													A__						:  Optional[int]		  =  add_prefix_space

													# Should have added re.IGNORECASE so BPE merges can happen for capitalized versions of contractions
													A__						:  int		  =  re.compile(r"""\'s|\'t|\'re|\'ve|\'m|\'ll|\'d| ?\p{L}+| ?\p{N}+| ?[^\s\p{L}\p{N}]+|\s+(?!\S)|\s+"""							)


							@property
							# Copied from transformers.models.bart.tokenization_bart.BartTokenizer.vocab_size
							def 						_UpperCamelCase       (			self      :						List[Any]							):
													'''simple docstring'''





													return len(self.encoder							)


							def 						_UpperCamelCase       (			self      :						Union[str, Any]							):
													'''simple docstring'''





													return dict(self.encoder			,    **self.added_tokens_encoder							)


							def 						_UpperCamelCase       (			self      :						int			,    snake_case      :						Optional[Any]							):
													'''simple docstring'''





													if token in self.cache:
																			return self.cache[token]
													A__						:  Tuple		  =  tuple(snake_case							)
													A__						:  Optional[int]		  =  get_pairs(snake_case							)

													if not pairs:
																			return token

													while True:
																			A__						:  Any		  =  min(snake_case			,    key=lambda snake_case							: self.bpe_ranks.get(snake_case			,    float("""inf"""							)							)							)
																			if bigram not in self.bpe_ranks:
																									break
																			A__  ,  A__						:  List[Any]		  =  bigram
																			A__						:  str		  =  []
																			A__						:  int		  =  0
																			while i < len(snake_case							):
																									try:
																															A__						:  Optional[Any]		  =  word.index(snake_case			,    snake_case							)
																									except ValueError:
																															new_word.extend(word[i:]							)
																															break
																									else:
																															new_word.extend(word[i:j]							)
																															A__						:  Union[str, Any]		  =  j

																									if word[i] == first and i < len(snake_case							) - 1 and word[i + 1] == second:
																															new_word.append(first + second							)
																															i += 2
																									else:
																															new_word.append(word[i]							)
																															i += 1
																			A__						:  Optional[Any]		  =  tuple(snake_case							)
																			A__						:  Tuple		  =  new_word
																			if len(snake_case							) == 1:
																									break
																			else:
																									A__						:  Optional[int]		  =  get_pairs(snake_case							)
													A__						:  Optional[int]		  =  """ """.join(snake_case							)
													A__						:  Tuple		  =  word
													return word


							def 						_UpperCamelCase       (			self      :						Any			,    snake_case      :						Dict							):
													'''simple docstring'''





													A__						:  Union[str, Any]		  =  []
													for token in re.findall(self.pat			,    snake_case							):
																			A__						:  Any		  =  """""".join(
																			    self.byte_encoder[b] for b in token.encode("""utf-8"""							)							)  # Maps all our bytes to unicode strings, avoiding control tokens of the BPE (spaces in our case)
																			bpe_tokens.extend(bpe_token for bpe_token in self.bpe(snake_case							).split(""" """							)							)
													return bpe_tokens


							def 						_UpperCamelCase       (			self      :						Union[str, Any]			,    snake_case      :						int							):
													'''simple docstring'''





													return self.encoder.get(snake_case			,    self.encoder.get(self.unk_token							)							)


							def 						_UpperCamelCase       (			self      :						Optional[Any]			,    snake_case      :						Optional[int]							):
													'''simple docstring'''





													return self.decoder.get(snake_case							)


							def 						_UpperCamelCase       (			self      :						str			,    snake_case      :						Any							):
													'''simple docstring'''





													A__						:  Optional[int]		  =  """""".join(snake_case							)
													A__						:  Tuple		  =  bytearray([self.byte_decoder[c] for c in text]							).decode("""utf-8"""			,    errors=self.errors							)
													return text


							def 						_UpperCamelCase       (			self      :						Optional[Any]			,    snake_case      :						Tuple			,    snake_case      :						Tuple = None							):
													'''simple docstring'''





													if not os.path.isdir(snake_case							):
																			logger.error(F'Vocabulary path ({save_directory}) should be a directory'							)
																			return
													A__						:  str		  =  os.path.join(
													    snake_case			,    (filename_prefix + """-""" if filename_prefix else """""") + VOCAB_FILES_NAMES["""vocab_file"""]							)
													A__						:  List[Any]		  =  os.path.join(
													    snake_case			,    (filename_prefix + """-""" if filename_prefix else """""") + VOCAB_FILES_NAMES["""merges_file"""]							)

													with open(snake_case			,    """w"""			,    encoding="""utf-8"""							) as f:
																			f.write(json.dumps(self.encoder			,    indent=2			,    sort_keys=snake_case			,    ensure_ascii=snake_case							) + """\n"""							)

													A__						:  List[str]		  =  0
													with open(snake_case			,    """w"""			,    encoding="""utf-8"""							) as writer:
																			writer.write("""#version: 0.2\n"""							)
																			for bpe_tokens, token_index in sorted(self.bpe_ranks.items()			,    key=lambda snake_case							: kv[1]							):
																									if index != token_index:
																															logger.warning(
																															    F'Saving vocabulary to {merge_file}: BPE merge indices are not consecutive.'
																															    """ Please check that the tokenizer is not corrupted!"""							)
																															A__						:  Optional[int]		  =  token_index
																									writer.write(""" """.join(snake_case							) + """\n"""							)
																									index += 1

													return vocab_file, merge_file


							def 						_UpperCamelCase       (			self      :						Union[str, Any]			,    snake_case      :						List[str]			,    snake_case      :						Optional[Any] = None							):
													'''simple docstring'''





													if token_ids_a is None:
																			return [self.cls_token_id] + token_ids_a + [self.sep_token_id]
													A__						:  Dict		  =  [self.cls_token_id]
													A__						:  Optional[int]		  =  [self.sep_token_id]
													return cls + token_ids_a + sep + sep + token_ids_a + sep


							def 						_UpperCamelCase       (			self      :						List[Any]			,    snake_case      :						List[Any]			,    snake_case      :						List[Any] = None			,    snake_case      :						List[Any] = False							):
													'''simple docstring'''





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

													if token_ids_a is None:
																			return [1] + ([0] * len(snake_case							)) + [1]
													return [1] + ([0] * len(snake_case							)) + [1, 1] + ([0] * len(snake_case							)) + [1]


							def 						_UpperCamelCase       (			self      :						Union[str, Any]			,    snake_case      :						Optional[Any]			,    snake_case      :						Union[str, Any] = None							):
													'''simple docstring'''





													A__						:  Optional[Any]		  =  [self.sep_token_id]
													A__						:  str		  =  [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 + sep + token_ids_a + sep							) * [0]


							def 						_UpperCamelCase       (			self      :						List[Any]			,    snake_case      :						List[str]			,    snake_case      :						List[Any]=False			,    **snake_case      :						Dict							):
													'''simple docstring'''





													A__						:  Optional[Any]		  =  kwargs.pop("""add_prefix_space"""			,    self.add_prefix_space							)
													if (is_split_into_words or add_prefix_space) and (len(snake_case							) > 0 and not text[0].isspace()):
																			A__						:  Union[str, Any]		  =  """ """ + text
													return (text, kwargs)


							def 						_UpperCamelCase       (			self      :						List[str]			,    snake_case      :						Dict			,    snake_case      :						Union[str, Any] = None			,    snake_case      :						Optional[int] = PaddingStrategy.DO_NOT_PAD			,    snake_case      :						List[str] = None			,    snake_case      :						List[str] = None			,    ):
													'''simple docstring'''





													A__						:  Tuple		  =  super()._pad(
													    encoded_inputs=snake_case			,    max_length=snake_case			,    padding_strategy=snake_case			,    pad_to_multiple_of=snake_case			,    return_attention_mask=snake_case			,    )

													# Load from model defaults
													if return_attention_mask is None:
																			A__						:  str		  =  """attention_mask""" in self.model_input_names

													if return_attention_mask and "global_attention_mask" in encoded_inputs:
																			A__						:  Dict		  =  encoded_inputs[self.model_input_names[0]]
																			# `global_attention_mask` need to have the same length as other (sequential) inputs.
																			A__						:  Optional[Any]		  =  len(encoded_inputs["""global_attention_mask"""]							) != len(snake_case							)

																			if needs_to_be_padded:
																									A__						:  str		  =  len(snake_case							) - len(encoded_inputs["""global_attention_mask"""]							)

																									if self.padding_side == "right":
																															# Use `-1` since `0` in `global_attention_mask` means `local attention` instead of `not to attend`
																															A__						:  Any		  =  (
																															    encoded_inputs["""global_attention_mask"""] + [-1] * difference
																															)
																									elif self.padding_side == "left":
																															A__						:  int		  =  [-1] * difference + encoded_inputs[
																															    """global_attention_mask"""
																															]
																									else:
																															raise ValueError("""Invalid padding strategy:""" + str(self.padding_side							)							)

													return encoded_inputs














"""simple docstring"""



import unittest

from transformers import (
    MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPING,
    TF_MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPING,
    TextClassificationPipeline,
    pipeline,
)
from transformers.testing_utils import is_pipeline_test, nested_simplify, require_tf, require_torch, slow

from .test_pipelines_common import ANY


# These 2 model types require different inputs than those of the usual text models.
A_    =							{'''LayoutLMv2Config''', '''LayoutLMv3Config'''}






@is_pipeline_test
class 							__SCREAMING_SNAKE_CASE						(				unittest.TestCase		):
							snake_case_     =							MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPING
							snake_case_     =							TF_MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPING

							if model_mapping is not None:
														snake_case_     =							{config: model for config, model in model_mapping.items() if config.__name__ not in _TO_SKIP}
							if tf_model_mapping is not None:
														snake_case_     =							{
														    config: model for config, model in tf_model_mapping.items() if config.__name__ not in _TO_SKIP
														}


							@require_torch
							def 						_UpperCamelCase       (			self      :						Tuple							):
													'''simple docstring'''





													A__						:  Tuple		  =  pipeline(
													    task="""text-classification"""			,    model="""hf-internal-testing/tiny-random-distilbert"""			,    framework="""pt"""							)

													A__						:  Dict		  =  text_classifier("""This is great !"""							)
													self.assertEqual(nested_simplify(snake_case							)			,    [{"""label""": """LABEL_0""", """score""": 0.504}]							)

													A__						:  Optional[int]		  =  text_classifier("""This is great !"""			,    top_k=2							)
													self.assertEqual(
													    nested_simplify(snake_case							)			,    [{"""label""": """LABEL_0""", """score""": 0.504}, {"""label""": """LABEL_1""", """score""": 0.496}]							)

													A__						:  Any		  =  text_classifier(["""This is great !""", """This is bad"""]			,    top_k=2							)
													self.assertEqual(
													    nested_simplify(snake_case							)			,    [
													        [{"""label""": """LABEL_0""", """score""": 0.504}, {"""label""": """LABEL_1""", """score""": 0.496}],
													        [{"""label""": """LABEL_0""", """score""": 0.504}, {"""label""": """LABEL_1""", """score""": 0.496}],
													    ]			,    )

													A__						:  Optional[Any]		  =  text_classifier("""This is great !"""			,    top_k=1							)
													self.assertEqual(nested_simplify(snake_case							)			,    [{"""label""": """LABEL_0""", """score""": 0.504}]							)

													# Legacy behavior
													A__						:  str		  =  text_classifier("""This is great !"""			,    return_all_scores=snake_case							)
													self.assertEqual(nested_simplify(snake_case							)			,    [{"""label""": """LABEL_0""", """score""": 0.504}]							)

													A__						:  int		  =  text_classifier("""This is great !"""			,    return_all_scores=snake_case							)
													self.assertEqual(
													    nested_simplify(snake_case							)			,    [[{"""label""": """LABEL_0""", """score""": 0.504}, {"""label""": """LABEL_1""", """score""": 0.496}]]							)

													A__						:  str		  =  text_classifier(["""This is great !""", """Something else"""]			,    return_all_scores=snake_case							)
													self.assertEqual(
													    nested_simplify(snake_case							)			,    [
													        [{"""label""": """LABEL_0""", """score""": 0.504}, {"""label""": """LABEL_1""", """score""": 0.496}],
													        [{"""label""": """LABEL_0""", """score""": 0.504}, {"""label""": """LABEL_1""", """score""": 0.496}],
													    ]			,    )

													A__						:  Optional[int]		  =  text_classifier(["""This is great !""", """Something else"""]			,    return_all_scores=snake_case							)
													self.assertEqual(
													    nested_simplify(snake_case							)			,    [
													        {"""label""": """LABEL_0""", """score""": 0.504},
													        {"""label""": """LABEL_0""", """score""": 0.504},
													    ]			,    )


							@require_torch
							def 						_UpperCamelCase       (			self      :						int							):
													'''simple docstring'''





													import torch

													A__						:  Tuple		  =  pipeline(
													    task="""text-classification"""			,    model="""hf-internal-testing/tiny-random-distilbert"""			,    framework="""pt"""			,    device=torch.device("""cpu"""							)			,    )

													A__						:  List[str]		  =  text_classifier("""This is great !"""							)
													self.assertEqual(nested_simplify(snake_case							)			,    [{"""label""": """LABEL_0""", """score""": 0.504}]							)


							@require_tf
							def 						_UpperCamelCase       (			self      :						List[str]							):
													'''simple docstring'''





													A__						:  str		  =  pipeline(
													    task="""text-classification"""			,    model="""hf-internal-testing/tiny-random-distilbert"""			,    framework="""tf"""							)

													A__						:  Optional[Any]		  =  text_classifier("""This is great !"""							)
													self.assertEqual(nested_simplify(snake_case							)			,    [{"""label""": """LABEL_0""", """score""": 0.504}]							)


							@slow
							@require_torch
							def 						_UpperCamelCase       (			self      :						List[Any]							):
													'''simple docstring'''





													A__						:  Optional[int]		  =  pipeline("""text-classification"""							)

													A__						:  Optional[int]		  =  text_classifier("""This is great !"""							)
													self.assertEqual(nested_simplify(snake_case							)			,    [{"""label""": """POSITIVE""", """score""": 1.0}]							)
													A__						:  Optional[Any]		  =  text_classifier("""This is bad !"""							)
													self.assertEqual(nested_simplify(snake_case							)			,    [{"""label""": """NEGATIVE""", """score""": 1.0}]							)
													A__						:  Dict		  =  text_classifier("""Birds are a type of animal"""							)
													self.assertEqual(nested_simplify(snake_case							)			,    [{"""label""": """POSITIVE""", """score""": 0.988}]							)


							@slow
							@require_tf
							def 						_UpperCamelCase       (			self      :						Any							):
													'''simple docstring'''





													A__						:  Union[str, Any]		  =  pipeline("""text-classification"""			,    framework="""tf"""							)

													A__						:  Dict		  =  text_classifier("""This is great !"""							)
													self.assertEqual(nested_simplify(snake_case							)			,    [{"""label""": """POSITIVE""", """score""": 1.0}]							)
													A__						:  Optional[int]		  =  text_classifier("""This is bad !"""							)
													self.assertEqual(nested_simplify(snake_case							)			,    [{"""label""": """NEGATIVE""", """score""": 1.0}]							)
													A__						:  Tuple		  =  text_classifier("""Birds are a type of animal"""							)
													self.assertEqual(nested_simplify(snake_case							)			,    [{"""label""": """POSITIVE""", """score""": 0.988}]							)


							def 						_UpperCamelCase       (			self      :						Optional[Any]			,    snake_case      :						Any			,    snake_case      :						List[Any]			,    snake_case      :						Any							):
													'''simple docstring'''





													A__						:  Union[str, Any]		  =  TextClassificationPipeline(model=snake_case			,    tokenizer=snake_case							)
													return text_classifier, ["HuggingFace is in", "This is another test"]


							def 						_UpperCamelCase       (			self      :						int			,    snake_case      :						Union[str, Any]			,    snake_case      :						Dict							):
													'''simple docstring'''





													A__						:  List[str]		  =  text_classifier.model
													# Small inputs because BartTokenizer tiny has maximum position embeddings = 22
													A__						:  int		  =  """HuggingFace is in"""
													A__						:  List[Any]		  =  text_classifier(snake_case							)

													self.assertEqual(nested_simplify(snake_case							)			,    [{"""label""": ANY(snake_case							), """score""": ANY(snake_case							)}]							)
													self.assertTrue(outputs[0]["""label"""] in model.config.idalabel.values()							)

													A__						:  Any		  =  ["""HuggingFace is in """, """Paris is in France"""]
													A__						:  Any		  =  text_classifier(snake_case							)
													self.assertEqual(
													    nested_simplify(snake_case							)			,    [{"""label""": ANY(snake_case							), """score""": ANY(snake_case							)}, {"""label""": ANY(snake_case							), """score""": ANY(snake_case							)}]			,    )
													self.assertTrue(outputs[0]["""label"""] in model.config.idalabel.values()							)
													self.assertTrue(outputs[1]["""label"""] in model.config.idalabel.values()							)

													# Forcing to get all results with `top_k=None`
													# This is NOT the legacy format
													A__						:  List[Any]		  =  text_classifier(snake_case			,    top_k=snake_case							)
													A__						:  Tuple		  =  len(model.config.idalabel.values()							)
													self.assertEqual(
													    nested_simplify(snake_case							)			,    [[{"""label""": ANY(snake_case							), """score""": ANY(snake_case							)}] * N, [{"""label""": ANY(snake_case							), """score""": ANY(snake_case							)}] * N]			,    )

													A__						:  Optional[Any]		  =  {"""text""": """HuggingFace is in """, """text_pair""": """Paris is in France"""}
													A__						:  Union[str, Any]		  =  text_classifier(snake_case							)
													self.assertEqual(
													    nested_simplify(snake_case							)			,    {"""label""": ANY(snake_case							), """score""": ANY(snake_case							)}			,    )
													self.assertTrue(outputs["""label"""] in model.config.idalabel.values()							)

													# This might be used a text pair, but tokenizer + pipe interaction
													# makes it hard to understand that it's not using the pair properly
													# https://github.com/huggingface/transformers/issues/17305
													# We disabled this usage instead as it was outputting wrong outputs.
													A__						:  Tuple		  =  [["""HuggingFace is in """, """Paris is in France"""]]
													with self.assertRaises(snake_case							):
																			text_classifier(snake_case							)

													# This used to be valid for doing text pairs
													# We're keeping it working because of backward compatibility
													A__						:  List[Any]		  =  text_classifier([[["""HuggingFace is in """, """Paris is in France"""]]]							)
													self.assertEqual(
													    nested_simplify(snake_case							)			,    [{"""label""": ANY(snake_case							), """score""": ANY(snake_case							)}]			,    )
													self.assertTrue(outputs[0]["""label"""] in model.config.idalabel.values()							)






