

import os
from typing import List, Union

import tensorflow as tf
from tensorflow_text import BertTokenizer as BertTokenizerLayer
from tensorflow_text import FastBertTokenizer, ShrinkLongestTrimmer, case_fold_utfa, combine_segments, pad_model_inputs

from .tokenization_bert import BertTokenizer
class SCREAMING_SNAKE_CASE_		(			tf.keras.layers.Layer		):







   def __init__(    self	:	List[Any]      ,      lowerCamelCase_	:	List      ,      lowerCamelCase_	:	bool      ,      lowerCamelCase_	:	int = None      ,      lowerCamelCase_	:	int = None      ,      lowerCamelCase_	:	int = None      ,      lowerCamelCase_	:	str = "longest"      ,      lowerCamelCase_	:	bool = True      ,      lowerCamelCase_	:	int = 512      ,      lowerCamelCase_	:	int = None      ,      lowerCamelCase_	:	bool = True      ,      lowerCamelCase_	:	bool = True      ,      lowerCamelCase_	:	bool = True      ,      **lowerCamelCase_	:	Dict      ,      ):





    """simple docstring"""


    super().__init__()
    if use_fast_bert_tokenizer:
     UpperCamelCase      =			FastBertTokenizer(
         UpperCAmelCase_      ,      token_out_type=tf.intaa      ,      lower_case_nfd_strip_accents=UpperCAmelCase_      ,      **UpperCAmelCase_							)
    else:
     UpperCamelCase      =			tf.lookup.StaticVocabularyTable(
         tf.lookup.KeyValueTensorInitializer(
             keys=UpperCAmelCase_      ,      key_dtype=tf.string      ,      values=tf.range(tf.size(UpperCAmelCase_      ,      out_type=tf.intaa							)      ,      dtype=tf.intaa							)      ,      value_dtype=tf.intaa      ,      )      ,      num_oov_buckets=1      ,      )
     UpperCamelCase      =			BertTokenizerLayer(
         UpperCAmelCase_      ,      token_out_type=tf.intaa      ,      lower_case=UpperCAmelCase_      ,      **UpperCAmelCase_							)

    UpperCamelCase      =			vocab_list
    UpperCamelCase      =			do_lower_case
    UpperCamelCase      =			cls_token_id or vocab_list.index("""[CLS]"""							)
    UpperCamelCase      =			sep_token_id or vocab_list.index("""[SEP]"""							)
    UpperCamelCase      =			pad_token_id or vocab_list.index("""[PAD]"""							)
    UpperCamelCase      =			ShrinkLongestTrimmer(max_length - 3      ,      axis=1							)  # Allow room for special tokens
    UpperCamelCase      =			max_length
    UpperCamelCase      =			padding
    UpperCamelCase      =			truncation
    UpperCamelCase      =			pad_to_multiple_of
    UpperCamelCase      =			return_token_type_ids
    UpperCamelCase      =			return_attention_mask







   @classmethod
   def 	lowerCamelCase_  (    cls	:	Union[str, Any]      ,      lowerCamelCase_	:	"PreTrainedTokenizerBase"      ,      **lowerCamelCase_	:	Tuple							):  # noqa: F821





    """simple docstring"""


    UpperCamelCase      =			kwargs.pop("""do_lower_case"""      ,      UpperCAmelCase_							)
    UpperCamelCase      =			tokenizer.do_lower_case if do_lower_case is None else do_lower_case
    UpperCamelCase      =			kwargs.pop("""cls_token_id"""      ,      UpperCAmelCase_							)
    UpperCamelCase      =			tokenizer.cls_token_id if cls_token_id is None else cls_token_id
    UpperCamelCase      =			kwargs.pop("""sep_token_id"""      ,      UpperCAmelCase_							)
    UpperCamelCase      =			tokenizer.sep_token_id if sep_token_id is None else sep_token_id
    UpperCamelCase      =			kwargs.pop("""pad_token_id"""      ,      UpperCAmelCase_							)
    UpperCamelCase      =			tokenizer.pad_token_id if pad_token_id is None else pad_token_id

    UpperCamelCase      =			tokenizer.get_vocab()
    UpperCamelCase      =			sorted([(wordpiece, idx) for wordpiece, idx in vocab.items()]      ,      key=lambda lowerCamelCase_							: x[1]							)
    UpperCamelCase      =			[entry[0] for entry in vocab]
    return cls(
        vocab_list=UpperCAmelCase_      ,      do_lower_case=UpperCAmelCase_      ,      cls_token_id=UpperCAmelCase_      ,      sep_token_id=UpperCAmelCase_      ,      pad_token_id=UpperCAmelCase_      ,      **UpperCAmelCase_      ,      )







   @classmethod
   def 	lowerCamelCase_  (    cls	:	Any      ,      lowerCamelCase_	:	Union[str, os.PathLike]      ,      *lowerCamelCase_	:	Union[str, Any]      ,      **lowerCamelCase_	:	Union[str, Any]							):





    """simple docstring"""


    try:
     UpperCamelCase      =			BertTokenizer.from_pretrained(UpperCAmelCase_      ,      *UpperCAmelCase_      ,      **UpperCAmelCase_							)
    except:  # noqa: E722
     from .tokenization_bert_fast import BertTokenizerFast

     UpperCamelCase      =			BertTokenizerFast.from_pretrained(UpperCAmelCase_      ,      *UpperCAmelCase_      ,      **UpperCAmelCase_							)
    return cls.from_tokenizer(UpperCAmelCase_      ,      **UpperCAmelCase_							)







   def 	lowerCamelCase_  (    self	:	Optional[Any]      ,      lowerCamelCase_	:	Union[str, Any]							):





    """simple docstring"""


    if self.do_lower_case:
     UpperCamelCase      =			case_fold_utfa(UpperCAmelCase_							)
    UpperCamelCase      =			self.tf_tokenizer.tokenize(UpperCAmelCase_							)
    return tokens.merge_dims(1      ,      -1							)







   def 	lowerCamelCase_  (    self	:	int      ,      lowerCamelCase_	:	str      ,      lowerCamelCase_	:	Optional[Any]=None      ,      lowerCamelCase_	:	Union[str, Any]=None      ,      lowerCamelCase_	:	Optional[int]=None      ,      lowerCamelCase_	:	Optional[int]=None      ,      lowerCamelCase_	:	int=None      ,      lowerCamelCase_	:	Dict=None      ,      lowerCamelCase_	:	List[str]=None      ,      ):





    """simple docstring"""


    if padding is None:
     UpperCamelCase      =			self.padding
    if padding not in ("longest", "max_length"):
     raise ValueError("""Padding must be either \'longest\' or \'max_length\'!"""							)
    if max_length is not None and text_pair is not None:
     # Because we have to instantiate a Trimmer to do it properly
     raise ValueError("""max_length cannot be overridden at call time when truncating paired texts!"""							)
    if max_length is None:
     UpperCamelCase      =			self.max_length
    if truncation is None:
     UpperCamelCase      =			self.truncation
    if pad_to_multiple_of is None:
     UpperCamelCase      =			self.pad_to_multiple_of
    if return_token_type_ids is None:
     UpperCamelCase      =			self.return_token_type_ids
    if return_attention_mask is None:
     UpperCamelCase      =			self.return_attention_mask
    if not isinstance(UpperCAmelCase_      ,      tf.Tensor							):
     UpperCamelCase      =			tf.convert_to_tensor(UpperCAmelCase_							)
    if text_pair is not None and not isinstance(UpperCAmelCase_      ,      tf.Tensor							):
     UpperCamelCase      =			tf.convert_to_tensor(UpperCAmelCase_							)
    if text_pair is not None:
     if text.shape.rank > 1:
      raise ValueError("""text argument should not be multidimensional when a text pair is supplied!"""							)
     if text_pair.shape.rank > 1:
      raise ValueError("""text_pair should not be multidimensional!"""							)
    if text.shape.rank == 2:
     UpperCamelCase      =			text[:, 0], text[:, 1]
    UpperCamelCase      =			self.unpaired_tokenize(UpperCAmelCase_							)
    if text_pair is None:  # Unpaired text
     if truncation:
      UpperCamelCase      =			text[:, : max_length - 2]  # Allow room for special tokens
     UpperCamelCase      =			combine_segments(
         (text,)      ,      start_of_sequence_id=self.cls_token_id      ,      end_of_segment_id=self.sep_token_id							)
    else:  # Paired text
     UpperCamelCase      =			self.unpaired_tokenize(UpperCAmelCase_							)
     if truncation:
      UpperCamelCase      =			self.paired_trimmer.trim([text, text_pair]							)
     UpperCamelCase      =			combine_segments(
         (text, text_pair)      ,      start_of_sequence_id=self.cls_token_id      ,      end_of_segment_id=self.sep_token_id							)
    if padding == "longest":
     UpperCamelCase      =			input_ids.bounding_shape(axis=1							)
     if pad_to_multiple_of is not None:
      # No ceiling division in tensorflow, so we negate floordiv instead
      UpperCamelCase      =			pad_to_multiple_of * (-tf.math.floordiv(-pad_length      ,      UpperCAmelCase_							))
    else:
     UpperCamelCase      =			max_length

    UpperCamelCase      =			pad_model_inputs(UpperCAmelCase_      ,      max_seq_length=UpperCAmelCase_      ,      pad_value=self.pad_token_id							)
    UpperCamelCase      =			{'input_ids': input_ids}
    if return_attention_mask:
     UpperCamelCase      =			attention_mask
    if return_token_type_ids:
     UpperCamelCase      =			pad_model_inputs(
         UpperCAmelCase_      ,      max_seq_length=UpperCAmelCase_      ,      pad_value=self.pad_token_id							)
     UpperCamelCase      =			token_type_ids
    return output







   def 	lowerCamelCase_  (    self	:	Dict							):





    """simple docstring"""


    return {
        "vocab_list": self.vocab_list,
        "do_lower_case": self.do_lower_case,
        "cls_token_id": self.cls_token_id,
        "sep_token_id": self.sep_token_id,
        "pad_token_id": self.pad_token_id,
    }

from collections import OrderedDict
from typing import Any, Mapping, Optional

from ... import PreTrainedTokenizer
from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig, OnnxConfigWithPast, OnnxSeqaSeqConfigWithPast
from ...onnx.utils import compute_effective_axis_dimension
from ...utils import TensorType, is_torch_available, logging


_SCREAMING_SNAKE_CASE   		=			logging.get_logger(__name__)

_SCREAMING_SNAKE_CASE   		=			{
    """facebook/mbart-large-cc25""": """https://huggingface.co/facebook/mbart-large-cc25/resolve/main/config.json""",
    # See all MBART models at https://huggingface.co/models?filter=mbart
}
class SCREAMING_SNAKE_CASE_		(			__lowerCAmelCase		):
   __lowerCAmelCase											=							"""mbart"""
   __lowerCAmelCase											=							["""past_key_values"""]
   __lowerCAmelCase											=							{"""num_attention_heads""": """encoder_attention_heads""", """hidden_size""": """d_model"""}







   def __init__(    self	:	Optional[int]      ,      lowerCamelCase_	:	Dict=5_0265      ,      lowerCamelCase_	:	Tuple=1024      ,      lowerCamelCase_	:	int=12      ,      lowerCamelCase_	:	Tuple=4096      ,      lowerCamelCase_	:	int=16      ,      lowerCamelCase_	:	Dict=12      ,      lowerCamelCase_	:	Dict=4096      ,      lowerCamelCase_	:	Optional[int]=16      ,      lowerCamelCase_	:	int=0.0      ,      lowerCamelCase_	:	Tuple=0.0      ,      lowerCamelCase_	:	int=True      ,      lowerCamelCase_	:	List[str]=True      ,      lowerCamelCase_	:	List[str]="gelu"      ,      lowerCamelCase_	:	str=1024      ,      lowerCamelCase_	:	int=0.1      ,      lowerCamelCase_	:	List[Any]=0.0      ,      lowerCamelCase_	:	Dict=0.0      ,      lowerCamelCase_	:	Union[str, Any]=0.0_2      ,      lowerCamelCase_	:	Tuple=0.0      ,      lowerCamelCase_	:	int=False      ,      lowerCamelCase_	:	List[Any]=1      ,      lowerCamelCase_	:	Union[str, Any]=0      ,      lowerCamelCase_	:	Optional[Any]=2      ,      lowerCamelCase_	:	Any=2      ,      **lowerCamelCase_	:	int      ,      ):





    """simple docstring"""


    UpperCamelCase      =			vocab_size
    UpperCamelCase      =			max_position_embeddings
    UpperCamelCase      =			d_model
    UpperCamelCase      =			encoder_ffn_dim
    UpperCamelCase      =			encoder_layers
    UpperCamelCase      =			encoder_attention_heads
    UpperCamelCase      =			decoder_ffn_dim
    UpperCamelCase      =			decoder_layers
    UpperCamelCase      =			decoder_attention_heads
    UpperCamelCase      =			dropout
    UpperCamelCase      =			attention_dropout
    UpperCamelCase      =			activation_dropout
    UpperCamelCase      =			activation_function
    UpperCamelCase      =			init_std
    UpperCamelCase      =			encoder_layerdrop
    UpperCamelCase      =			decoder_layerdrop
    UpperCamelCase      =			classifier_dropout
    UpperCamelCase      =			use_cache
    UpperCamelCase      =			encoder_layers
    UpperCamelCase      =			scale_embedding  # scale factor will be sqrt(d_model) if True
    super().__init__(
        pad_token_id=lowerCamelCase_      ,      bos_token_id=lowerCamelCase_      ,      eos_token_id=lowerCamelCase_      ,      is_encoder_decoder=lowerCamelCase_      ,      forced_eos_token_id=lowerCamelCase_      ,      **lowerCamelCase_      ,      )





class SCREAMING_SNAKE_CASE_		(			__lowerCAmelCase		):







   @property
   def 	lowerCamelCase_  (    self	:	List[str]							):





    """simple docstring"""


    if self.task in ["default", "seq2seq-lm"]:
     UpperCamelCase      =			OrderedDict(
         [
             ("""input_ids""", {0: """batch""", 1: """encoder_sequence"""}),
             ("""attention_mask""", {0: """batch""", 1: """encoder_sequence"""}),
         ]							)

     if self.use_past:
      UpperCamelCase      =			{0: """batch"""}
      UpperCamelCase      =			{0: """batch""", 1: """past_decoder_sequence + sequence"""}
     else:
      UpperCamelCase      =			{0: """batch""", 1: """decoder_sequence"""}
      UpperCamelCase      =			{0: """batch""", 1: """decoder_sequence"""}

     if self.use_past:
      self.fill_with_past_key_values_(lowerCamelCase_      ,      direction="""inputs"""							)
    elif self.task == "causal-lm":
     # TODO: figure this case out.
     UpperCamelCase      =			OrderedDict(
         [
             ("""input_ids""", {0: """batch""", 1: """encoder_sequence"""}),
             ("""attention_mask""", {0: """batch""", 1: """encoder_sequence"""}),
         ]							)
     if self.use_past:
      UpperCamelCase     ,    UpperCamelCase      =			self.num_layers
      for i in range(lowerCamelCase_							):
       UpperCamelCase      =			{0: """batch""", 2: """past_sequence + sequence"""}
       UpperCamelCase      =			{0: """batch""", 2: """past_sequence + sequence"""}
    else:
     UpperCamelCase      =			OrderedDict(
         [
             ("""input_ids""", {0: """batch""", 1: """encoder_sequence"""}),
             ("""attention_mask""", {0: """batch""", 1: """encoder_sequence"""}),
             ("""decoder_input_ids""", {0: """batch""", 1: """decoder_sequence"""}),
             ("""decoder_attention_mask""", {0: """batch""", 1: """decoder_sequence"""}),
         ]							)

    return common_inputs







   @property
   def 	lowerCamelCase_  (    self	:	str							):





    """simple docstring"""


    if self.task in ["default", "seq2seq-lm"]:
     UpperCamelCase      =			super().outputs
    else:
     UpperCamelCase      =			super(lowerCamelCase_      ,      self							).outputs
     if self.use_past:
      UpperCamelCase     ,    UpperCamelCase      =			self.num_layers
      for i in range(lowerCamelCase_							):
       UpperCamelCase      =			{0: """batch""", 2: """past_sequence + sequence"""}
       UpperCamelCase      =			{0: """batch""", 2: """past_sequence + sequence"""}
    return common_outputs







   def 	lowerCamelCase_  (    self	:	List[Any]      ,      lowerCamelCase_	:	PreTrainedTokenizer      ,      lowerCamelCase_	:	int = -1      ,      lowerCamelCase_	:	int = -1      ,      lowerCamelCase_	:	bool = False      ,      lowerCamelCase_	:	Optional[TensorType] = None      ,      ):





    """simple docstring"""


    UpperCamelCase      =			self._generate_dummy_inputs_for_sequence_classification_and_question_answering(
        lowerCamelCase_      ,      lowerCamelCase_      ,      lowerCamelCase_      ,      lowerCamelCase_      ,      lowerCamelCase_							)

    # Generate decoder inputs
    UpperCamelCase      =			seq_length if not self.use_past else 1
    UpperCamelCase      =			self._generate_dummy_inputs_for_sequence_classification_and_question_answering(
        lowerCamelCase_      ,      lowerCamelCase_      ,      lowerCamelCase_      ,      lowerCamelCase_      ,      lowerCamelCase_							)
    UpperCamelCase      =			{f"""decoder_{name}""": tensor for name, tensor in decoder_inputs.items()}
    UpperCamelCase      =			dict(**lowerCamelCase_      ,      **lowerCamelCase_							)

    if self.use_past:
     if not is_torch_available():
      raise ValueError("""Cannot generate dummy past_keys inputs without PyTorch installed."""							)
     else:
      import torch
     UpperCamelCase     ,    UpperCamelCase      =			common_inputs["""input_ids"""].shape
     UpperCamelCase      =			common_inputs["""decoder_input_ids"""].shape[1]
     UpperCamelCase     ,    UpperCamelCase      =			self.num_attention_heads
     UpperCamelCase      =			(
         batch,
         num_encoder_attention_heads,
         encoder_seq_length,
         self._config.hidden_size // num_encoder_attention_heads,
     )
     UpperCamelCase      =			decoder_seq_length + 3
     UpperCamelCase      =			(
         batch,
         num_decoder_attention_heads,
         decoder_past_length,
         self._config.hidden_size // num_decoder_attention_heads,
     )

     UpperCamelCase      =			torch.cat(
         [common_inputs["""decoder_attention_mask"""], torch.ones(lowerCamelCase_      ,      lowerCamelCase_							)]      ,      dim=1							)

     UpperCamelCase      =			[]
     # If the number of encoder and decoder layers are present in the model configuration, both are considered
     UpperCamelCase     ,    UpperCamelCase      =			self.num_layers
     UpperCamelCase      =			min(lowerCamelCase_      ,      lowerCamelCase_							)
     UpperCamelCase      =			max(lowerCamelCase_      ,      lowerCamelCase_							) - min_num_layers
     UpperCamelCase      =			"""encoder""" if num_encoder_layers > num_decoder_layers else """decoder"""

     for _ in range(lowerCamelCase_							):
      common_inputs["past_key_values"].append(
          (
              torch.zeros(lowerCamelCase_							),
              torch.zeros(lowerCamelCase_							),
              torch.zeros(lowerCamelCase_							),
              torch.zeros(lowerCamelCase_							),
          )							)
     # TODO: test this.
     UpperCamelCase      =			encoder_shape if remaining_side_name == """encoder""" else decoder_shape
     for _ in range(lowerCamelCase_      ,      lowerCamelCase_							):
      common_inputs["past_key_values"].append((torch.zeros(lowerCamelCase_							), torch.zeros(lowerCamelCase_							))							)
    return common_inputs







   def 	lowerCamelCase_  (    self	:	Dict      ,      lowerCamelCase_	:	PreTrainedTokenizer      ,      lowerCamelCase_	:	int = -1      ,      lowerCamelCase_	:	int = -1      ,      lowerCamelCase_	:	bool = False      ,      lowerCamelCase_	:	Optional[TensorType] = None      ,      ):





    """simple docstring"""


    UpperCamelCase      =			self._generate_dummy_inputs_for_sequence_classification_and_question_answering(
        lowerCamelCase_      ,      lowerCamelCase_      ,      lowerCamelCase_      ,      lowerCamelCase_      ,      lowerCamelCase_							)

    if self.use_past:
     if not is_torch_available():
      raise ValueError("""Cannot generate dummy past_keys inputs without PyTorch installed."""							)
     else:
      import torch
     UpperCamelCase     ,    UpperCamelCase      =			common_inputs["""input_ids"""].shape
     # Not using the same length for past_key_values
     UpperCamelCase      =			seqlen + 2
     UpperCamelCase     ,    UpperCamelCase      =			self.num_layers
     UpperCamelCase     ,    UpperCamelCase      =			self.num_attention_heads
     UpperCamelCase      =			(
         batch,
         num_encoder_attention_heads,
         past_key_values_length,
         self._config.hidden_size // num_encoder_attention_heads,
     )

     UpperCamelCase      =			common_inputs["""attention_mask"""].dtype
     UpperCamelCase      =			torch.cat(
         [common_inputs["""attention_mask"""], torch.ones(lowerCamelCase_      ,      lowerCamelCase_      ,      dtype=lowerCamelCase_							)]      ,      dim=1							)
     UpperCamelCase      =			[
         (torch.zeros(lowerCamelCase_							), torch.zeros(lowerCamelCase_							)) for _ in range(lowerCamelCase_							)
     ]
    return common_inputs







   def 	lowerCamelCase_  (    self	:	Optional[Any]      ,      lowerCamelCase_	:	PreTrainedTokenizer      ,      lowerCamelCase_	:	int = -1      ,      lowerCamelCase_	:	int = -1      ,      lowerCamelCase_	:	bool = False      ,      lowerCamelCase_	:	Optional[TensorType] = None      ,      ):





    """simple docstring"""


    UpperCamelCase      =			compute_effective_axis_dimension(
        lowerCamelCase_      ,      fixed_dimension=OnnxConfig.default_fixed_batch      ,      num_token_to_add=0							)

    # If dynamic axis (-1) we forward with a fixed dimension of 8 tokens to avoid optimizations made by ONNX
    UpperCamelCase      =			tokenizer.num_special_tokens_to_add(lowerCamelCase_							)
    UpperCamelCase      =			compute_effective_axis_dimension(
        lowerCamelCase_      ,      fixed_dimension=OnnxConfig.default_fixed_sequence      ,      num_token_to_add=lowerCamelCase_							)

    # Generate dummy inputs according to compute batch and sequence
    UpperCamelCase      =			[""" """.join([tokenizer.unk_token]							) * seq_length] * batch_size
    UpperCamelCase      =			dict(tokenizer(lowerCamelCase_      ,      return_tensors=lowerCamelCase_							)							)
    return common_inputs







   def 	lowerCamelCase_  (    self	:	List[Any]      ,      lowerCamelCase_	:	PreTrainedTokenizer      ,      lowerCamelCase_	:	int = -1      ,      lowerCamelCase_	:	int = -1      ,      lowerCamelCase_	:	bool = False      ,      lowerCamelCase_	:	Optional[TensorType] = None      ,      ):





    """simple docstring"""


    if self.task in ["default", "seq2seq-lm"]:
     UpperCamelCase      =			self._generate_dummy_inputs_for_default_and_seqaseq_lm(
         lowerCamelCase_      ,      batch_size=lowerCamelCase_      ,      seq_length=lowerCamelCase_      ,      is_pair=lowerCamelCase_      ,      framework=lowerCamelCase_							)

    elif self.task == "causal-lm":
     UpperCamelCase      =			self._generate_dummy_inputs_for_causal_lm(
         lowerCamelCase_      ,      batch_size=lowerCamelCase_      ,      seq_length=lowerCamelCase_      ,      is_pair=lowerCamelCase_      ,      framework=lowerCamelCase_							)
    else:
     UpperCamelCase      =			self._generate_dummy_inputs_for_sequence_classification_and_question_answering(
         lowerCamelCase_      ,      batch_size=lowerCamelCase_      ,      seq_length=lowerCamelCase_      ,      is_pair=lowerCamelCase_      ,      framework=lowerCamelCase_							)

    return common_inputs







   def 	lowerCamelCase_  (    self	:	Optional[Any]      ,      lowerCamelCase_	:	int      ,      lowerCamelCase_	:	Union[str, Any]      ,      lowerCamelCase_	:	Optional[Any]      ,      lowerCamelCase_	:	List[str]							):





    """simple docstring"""


    if self.task in ["default", "seq2seq-lm"]:
     UpperCamelCase      =			super()._flatten_past_key_values_(lowerCamelCase_      ,      lowerCamelCase_      ,      lowerCamelCase_      ,      lowerCamelCase_							)
    else:
     UpperCamelCase      =			super(lowerCamelCase_      ,      self							)._flatten_past_key_values_(
         lowerCamelCase_      ,      lowerCamelCase_      ,      lowerCamelCase_      ,      lowerCamelCase_							)
