



import argparse
import json
import os
import sys
import tempfile
import unittest
from argparse import Namespace
from dataclasses import dataclass, field
from enum import Enum
from pathlib import Path
from typing import List, Literal, Optional

import yaml

from transformers import HfArgumentParser, TrainingArguments
from transformers.hf_argparser import make_choice_type_function, string_to_bool


# Since Python 3.10, we can use the builtin `|` operator for Union types
# See PEP 604: https://peps.python.org/pep-0604
__SCREAMING_SNAKE_CASE           =  sys.version_info >= (3, 10)




def 	UpperCAmelCase   (						_lowerCamelCase=None ,    _lowerCamelCase=None    ):
			return field(default_factory=lambda: default ,    metadata=_lowerCamelCase    )

@dataclass
class 	lowerCamelCase_    :






						'''simple docstring'''
						a__   =  42
						a__   =  42
						a__   =  42
						a__   =  42







@dataclass
class 	lowerCamelCase_    :






						'''simple docstring'''
						a__   =  42
						a__   =  field(default="toto"						,metadata={"help": "help message"}						)







@dataclass
class 	lowerCamelCase_    :






						'''simple docstring'''
						a__   =  False
						a__   =  True
						a__   =  None







class 	lowerCamelCase_    ( _A						):






						'''simple docstring'''
						a__   =  "titi"
						a__   =  "toto"







class 	lowerCamelCase_    ( _A						):






						'''simple docstring'''
						a__   =  "titi"
						a__   =  "toto"
						a__   =  42







@dataclass
class 	lowerCamelCase_    :






						'''simple docstring'''
						a__   =  "toto"







						def 			SCREAMING_SNAKE_CASE__		(	self      :			Any )      ->				Any:
									A							:					Optional[int]              =						BasicEnum(self.foo )







@dataclass
class 	lowerCamelCase_    :






						'''simple docstring'''
						a__   =  "toto"







						def 			SCREAMING_SNAKE_CASE__		(	self      :			str )      ->				List[Any]:
									A							:					Union[str, Any]              =						MixedTypeEnum(self.foo )







@dataclass
class 	lowerCamelCase_    :






						'''simple docstring'''
						a__   =  None
						a__   =  field(default=_A						,metadata={"help": "help message"}						)
						a__   =  None
						a__   =  list_field(default=[]						)
						a__   =  list_field(default=[]						)







@dataclass
class 	lowerCamelCase_    :






						'''simple docstring'''
						a__   =  list_field(default=[]						)
						a__   =  list_field(default=[1, 2, 3]						)
						a__   =  list_field(default=["Hallo", "Bonjour", "Hello"]						)
						a__   =  list_field(default=[0.1, 0.2, 0.3]						)







@dataclass
class 	lowerCamelCase_    :






						'''simple docstring'''
						a__   =  field()
						a__   =  field()
						a__   =  field()







						def 			SCREAMING_SNAKE_CASE__		(	self      :			List[Any] )      ->				str:
									A							:					List[str]              =						BasicEnum(self.required_enum )







@dataclass
class 	lowerCamelCase_    :






						'''simple docstring'''
						a__   =  42
						a__   =  field()
						a__   =  None
						a__   =  field(default="toto"						,metadata={"help": "help message"}						)
						a__   =  list_field(default=["Hallo", "Bonjour", "Hello"]						)


if is_python_no_less_than_3_10:

							@dataclass
							class 	lowerCamelCase_    :






													'''simple docstring'''
													a__   =  False
													a__   =  True
													a__   =  None







							@dataclass
							class 	lowerCamelCase_    :






													'''simple docstring'''
													a__   =  None
													a__   =  field(default=_A						,metadata={"help": "help message"}						)
													a__   =  None
													a__   =  list_field(default=[]						)
													a__   =  list_field(default=[]						)






class 	lowerCamelCase_    ( unittest.TestCase						):






						'''simple docstring'''







						def 			SCREAMING_SNAKE_CASE__		(	self      :			str	,	__lowerCamelCase      :			argparse.ArgumentParser	,	__lowerCamelCase      :			argparse.ArgumentParser )      ->				Optional[Any]:
									self.assertEqual(len(a._actions )	,	len(b._actions ) )
									for x, y in zip(a._actions	,	b._actions ):
												A							:					Union[str, Any]              =						{k: v for k, v in vars(__lowerCamelCase ).items() if k != "container"}
												A							:					str              =						{k: v for k, v in vars(__lowerCamelCase ).items() if k != "container"}

												# Choices with mixed type have custom function as "type"
												# So we need to compare results directly for equality
												if xx.get("choices"	,	__lowerCamelCase ) and yy.get("choices"	,	__lowerCamelCase ):
															for expected_choice in yy["choices"] + xx["choices"]:
																		self.assertEqual(xx["type"](__lowerCamelCase )	,	yy["type"](__lowerCamelCase ) )
															del xx["type"], yy["type"]

												self.assertEqual(__lowerCamelCase	,	__lowerCamelCase )







						def 			SCREAMING_SNAKE_CASE__		(	self      :			Union[str, Any] )      ->				List[str]:
									A							:					List[Any]              =						HfArgumentParser(__lowerCamelCase )

									A							:					List[Any]              =						argparse.ArgumentParser()
									expected.add_argument("--foo"	,	type=__lowerCamelCase	,	required=__lowerCamelCase )
									expected.add_argument("--bar"	,	type=__lowerCamelCase	,	required=__lowerCamelCase )
									expected.add_argument("--baz"	,	type=__lowerCamelCase	,	required=__lowerCamelCase )
									expected.add_argument("--flag"	,	type=__lowerCamelCase	,	default=__lowerCamelCase	,	const=__lowerCamelCase	,	nargs="?" )
									self.argparsersEqual(__lowerCamelCase	,	__lowerCamelCase )

									A							:					Dict              =						["--foo", "1", "--baz", "quux", "--bar", "0.5"]
									((A)       , )							:					Optional[Any]              =						parser.parse_args_into_dataclasses(__lowerCamelCase	,	look_for_args_file=__lowerCamelCase )
									self.assertFalse(example.flag )







						def 			SCREAMING_SNAKE_CASE__		(	self      :			Optional[Any] )      ->				Tuple:
									A							:					str              =						HfArgumentParser(__lowerCamelCase )

									A							:					Any              =						argparse.ArgumentParser()
									expected.add_argument("--foo"	,	default=42	,	type=__lowerCamelCase )
									expected.add_argument("--baz"	,	default="toto"	,	type=__lowerCamelCase	,	help="help message" )
									self.argparsersEqual(__lowerCamelCase	,	__lowerCamelCase )







						def 			SCREAMING_SNAKE_CASE__		(	self      :			Union[str, Any] )      ->				Tuple:
									A							:					Any              =						argparse.ArgumentParser()
									expected.add_argument("--foo"	,	type=__lowerCamelCase	,	default=__lowerCamelCase	,	const=__lowerCamelCase	,	nargs="?" )
									expected.add_argument("--baz"	,	type=__lowerCamelCase	,	default=__lowerCamelCase	,	const=__lowerCamelCase	,	nargs="?" )
									# A boolean no_* argument always has to come after its "default: True" regular counter-part
									# and its default must be set to False
									expected.add_argument("--no_baz"	,	action="store_false"	,	default=__lowerCamelCase	,	dest="baz" )
									expected.add_argument("--opt"	,	type=__lowerCamelCase	,	default=__lowerCamelCase )

									A							:					Union[str, Any]              =						[WithDefaultBoolExample]
									if is_python_no_less_than_3_10:
												dataclass_types.append(__lowerCamelCase )

									for dataclass_type in dataclass_types:
												A							:					int              =						HfArgumentParser(__lowerCamelCase )
												self.argparsersEqual(__lowerCamelCase	,	__lowerCamelCase )

												A							:					Union[str, Any]              =						parser.parse_args([] )
												self.assertEqual(__lowerCamelCase	,	Namespace(foo=__lowerCamelCase	,	baz=__lowerCamelCase	,	opt=__lowerCamelCase ) )

												A							:					List[str]              =						parser.parse_args(["--foo", "--no_baz"] )
												self.assertEqual(__lowerCamelCase	,	Namespace(foo=__lowerCamelCase	,	baz=__lowerCamelCase	,	opt=__lowerCamelCase ) )

												A							:					Any              =						parser.parse_args(["--foo", "--baz"] )
												self.assertEqual(__lowerCamelCase	,	Namespace(foo=__lowerCamelCase	,	baz=__lowerCamelCase	,	opt=__lowerCamelCase ) )

												A							:					List[Any]              =						parser.parse_args(["--foo", "True", "--baz", "True", "--opt", "True"] )
												self.assertEqual(__lowerCamelCase	,	Namespace(foo=__lowerCamelCase	,	baz=__lowerCamelCase	,	opt=__lowerCamelCase ) )

												A							:					Tuple              =						parser.parse_args(["--foo", "False", "--baz", "False", "--opt", "False"] )
												self.assertEqual(__lowerCamelCase	,	Namespace(foo=__lowerCamelCase	,	baz=__lowerCamelCase	,	opt=__lowerCamelCase ) )







						def 			SCREAMING_SNAKE_CASE__		(	self      :			int )      ->				List[Any]:
									A							:					List[str]              =						HfArgumentParser(__lowerCamelCase )

									A							:					Any              =						argparse.ArgumentParser()
									expected.add_argument(
									    "--foo"	,	default="toto"	,	choices=["titi", "toto", 42]	,	type=make_choice_type_function(["titi", "toto", 42] )	,	)
									self.argparsersEqual(__lowerCamelCase	,	__lowerCamelCase )

									A							:					Union[str, Any]              =						parser.parse_args([] )
									self.assertEqual(args.foo	,	"toto" )
									A							:					Tuple              =						parser.parse_args_into_dataclasses([] )[0]
									self.assertEqual(enum_ex.foo	,	MixedTypeEnum.toto )

									A							:					Optional[Any]              =						parser.parse_args(["--foo", "titi"] )
									self.assertEqual(args.foo	,	"titi" )
									A							:					str              =						parser.parse_args_into_dataclasses(["--foo", "titi"] )[0]
									self.assertEqual(enum_ex.foo	,	MixedTypeEnum.titi )

									A							:					Optional[int]              =						parser.parse_args(["--foo", "42"] )
									self.assertEqual(args.foo	,	42 )
									A							:					Optional[int]              =						parser.parse_args_into_dataclasses(["--foo", "42"] )[0]
									self.assertEqual(enum_ex.foo	,	MixedTypeEnum.fourtytwo )







						def 			SCREAMING_SNAKE_CASE__		(	self      :			Optional[int] )      ->				Tuple:

									@dataclass
									class 	lowerCamelCase_    :






															'''simple docstring'''
															a__   =  "toto"







									A							:					List[str]              =						HfArgumentParser(__lowerCamelCase )

									A							:					List[Any]              =						argparse.ArgumentParser()
									expected.add_argument(
									    "--foo"	,	default="toto"	,	choices=("titi", "toto", 42)	,	type=make_choice_type_function(["titi", "toto", 42] )	,	)
									self.argparsersEqual(__lowerCamelCase	,	__lowerCamelCase )

									A							:					Optional[int]              =						parser.parse_args([] )
									self.assertEqual(args.foo	,	"toto" )

									A							:					Tuple              =						parser.parse_args(["--foo", "titi"] )
									self.assertEqual(args.foo	,	"titi" )

									A							:					int              =						parser.parse_args(["--foo", "42"] )
									self.assertEqual(args.foo	,	42 )







						def 			SCREAMING_SNAKE_CASE__		(	self      :			Tuple )      ->				Tuple:
									A							:					List[Any]              =						HfArgumentParser(__lowerCamelCase )

									A							:					List[str]              =						argparse.ArgumentParser()
									expected.add_argument("--foo_int"	,	nargs="+"	,	default=[]	,	type=__lowerCamelCase )
									expected.add_argument("--bar_int"	,	nargs="+"	,	default=[1, 2, 3]	,	type=__lowerCamelCase )
									expected.add_argument("--foo_str"	,	nargs="+"	,	default=["Hallo", "Bonjour", "Hello"]	,	type=__lowerCamelCase )
									expected.add_argument("--foo_float"	,	nargs="+"	,	default=[0.1, 0.2, 0.3]	,	type=__lowerCamelCase )

									self.argparsersEqual(__lowerCamelCase	,	__lowerCamelCase )

									A							:					Tuple              =						parser.parse_args([] )
									self.assertEqual(
									    __lowerCamelCase	,	Namespace(foo_int=[]	,	bar_int=[1, 2, 3]	,	foo_str=["Hallo", "Bonjour", "Hello"]	,	foo_float=[0.1, 0.2, 0.3] )	,	)

									A							:					Union[str, Any]              =						parser.parse_args("--foo_int 1 --bar_int 2 3 --foo_str a b c --foo_float 0.1 0.7".split() )
									self.assertEqual(__lowerCamelCase	,	Namespace(foo_int=[1]	,	bar_int=[2, 3]	,	foo_str=["a", "b", "c"]	,	foo_float=[0.1, 0.7] ) )







						def 			SCREAMING_SNAKE_CASE__		(	self      :			Optional[int] )      ->				Optional[int]:
									A							:					Any              =						argparse.ArgumentParser()
									expected.add_argument("--foo"	,	default=__lowerCamelCase	,	type=__lowerCamelCase )
									expected.add_argument("--bar"	,	default=__lowerCamelCase	,	type=__lowerCamelCase	,	help="help message" )
									expected.add_argument("--baz"	,	default=__lowerCamelCase	,	type=__lowerCamelCase )
									expected.add_argument("--ces"	,	nargs="+"	,	default=[]	,	type=__lowerCamelCase )
									expected.add_argument("--des"	,	nargs="+"	,	default=[]	,	type=__lowerCamelCase )

									A							:					List[str]              =						[OptionalExample]
									if is_python_no_less_than_3_10:
												dataclass_types.append(__lowerCamelCase )

									for dataclass_type in dataclass_types:
												A							:					Optional[Any]              =						HfArgumentParser(__lowerCamelCase )

												self.argparsersEqual(__lowerCamelCase	,	__lowerCamelCase )

												A							:					List[Any]              =						parser.parse_args([] )
												self.assertEqual(__lowerCamelCase	,	Namespace(foo=__lowerCamelCase	,	bar=__lowerCamelCase	,	baz=__lowerCamelCase	,	ces=[]	,	des=[] ) )

												A							:					Dict              =						parser.parse_args("--foo 12 --bar 3.14 --baz 42 --ces a b c --des 1 2 3".split() )
												self.assertEqual(__lowerCamelCase	,	Namespace(foo=12	,	bar=3.14	,	baz="42"	,	ces=["a", "b", "c"]	,	des=[1, 2, 3] ) )







						def 			SCREAMING_SNAKE_CASE__		(	self      :			Optional[Any] )      ->				Optional[int]:
									A							:					Dict              =						HfArgumentParser(__lowerCamelCase )

									A							:					Optional[Any]              =						argparse.ArgumentParser()
									expected.add_argument("--required_list"	,	nargs="+"	,	type=__lowerCamelCase	,	required=__lowerCamelCase )
									expected.add_argument("--required_str"	,	type=__lowerCamelCase	,	required=__lowerCamelCase )
									expected.add_argument(
									    "--required_enum"	,	type=make_choice_type_function(["titi", "toto"] )	,	choices=["titi", "toto"]	,	required=__lowerCamelCase	,	)
									self.argparsersEqual(__lowerCamelCase	,	__lowerCamelCase )







						def 			SCREAMING_SNAKE_CASE__		(	self      :			Optional[Any] )      ->				str:
									A							:					List[str]              =						HfArgumentParser(__lowerCamelCase )

									A							:					List[Any]              =						argparse.ArgumentParser()
									expected.add_argument("--foo"	,	type=__lowerCamelCase	,	required=__lowerCamelCase )
									expected.add_argument(
									    "--required_enum"	,	type=make_choice_type_function(["titi", "toto"] )	,	choices=["titi", "toto"]	,	required=__lowerCamelCase	,	)
									expected.add_argument("--opt"	,	type=__lowerCamelCase	,	default=__lowerCamelCase )
									expected.add_argument("--baz"	,	default="toto"	,	type=__lowerCamelCase	,	help="help message" )
									expected.add_argument("--foo_str"	,	nargs="+"	,	default=["Hallo", "Bonjour", "Hello"]	,	type=__lowerCamelCase )
									self.argparsersEqual(__lowerCamelCase	,	__lowerCamelCase )







						def 			SCREAMING_SNAKE_CASE__		(	self      :			int )      ->				Union[str, Any]:
									A							:					Optional[Any]              =						HfArgumentParser(__lowerCamelCase )

									A							:					int              =						{
									    "foo": 12,
									    "bar": 3.14,
									    "baz": "42",
									    "flag": True,
									}

									A							:					List[Any]              =						parser.parse_dict(__lowerCamelCase )[0]
									A							:					int              =						BasicExample(**__lowerCamelCase )
									self.assertEqual(__lowerCamelCase	,	__lowerCamelCase )







						def 			SCREAMING_SNAKE_CASE__		(	self      :			Optional[Any] )      ->				Optional[Any]:
									A							:					List[Any]              =						HfArgumentParser(__lowerCamelCase )

									A							:					str              =						{
									    "foo": 12,
									    "bar": 3.14,
									    "baz": "42",
									    "flag": True,
									    "extra": 42,
									}

									self.assertRaises(__lowerCamelCase	,	parser.parse_dict	,	__lowerCamelCase	,	allow_extra_keys=__lowerCamelCase )







						def 			SCREAMING_SNAKE_CASE__		(	self      :			List[Any] )      ->				Union[str, Any]:
									A							:					Optional[int]              =						HfArgumentParser(__lowerCamelCase )

									A							:					List[str]              =						{
									    "foo": 12,
									    "bar": 3.14,
									    "baz": "42",
									    "flag": True,
									}
									with tempfile.TemporaryDirectory() as tmp_dir:
												A							:					List[Any]              =						os.path.join(__lowerCamelCase	,	"temp_json" )
												os.mkdir(__lowerCamelCase )
												with open(temp_local_path + ".json"	,	"w+" ) as f:
															json.dump(__lowerCamelCase	,	__lowerCamelCase )
												A							:					Tuple              =						parser.parse_yaml_file(Path(temp_local_path + ".json" ) )[0]

									A							:					List[Any]              =						BasicExample(**__lowerCamelCase )
									self.assertEqual(__lowerCamelCase	,	__lowerCamelCase )







						def 			SCREAMING_SNAKE_CASE__		(	self      :			List[Any] )      ->				Tuple:
									A							:					Any              =						HfArgumentParser(__lowerCamelCase )

									A							:					Optional[Any]              =						{
									    "foo": 12,
									    "bar": 3.14,
									    "baz": "42",
									    "flag": True,
									}
									with tempfile.TemporaryDirectory() as tmp_dir:
												A							:					List[Any]              =						os.path.join(__lowerCamelCase	,	"temp_yaml" )
												os.mkdir(__lowerCamelCase )
												with open(temp_local_path + ".yaml"	,	"w+" ) as f:
															yaml.dump(__lowerCamelCase	,	__lowerCamelCase )
												A							:					Any              =						parser.parse_yaml_file(Path(temp_local_path + ".yaml" ) )[0]
									A							:					Tuple              =						BasicExample(**__lowerCamelCase )
									self.assertEqual(__lowerCamelCase	,	__lowerCamelCase )







						def 			SCREAMING_SNAKE_CASE__		(	self      :			str )      ->				int:
									A							:					Any              =						HfArgumentParser(__lowerCamelCase )
									self.assertIsNotNone(__lowerCamelCase )




import time
import warnings
from abc import ABC
from copy import deepcopy
from typing import Optional

import torch

from ..utils import add_start_docstrings, logging


__SCREAMING_SNAKE_CASE           =  logging.get_logger(__name__)


__SCREAMING_SNAKE_CASE           =  r"""
    Args:
        input_ids (`torch.LongTensor` of shape `(batch_size, sequence_length)`):
            Indices of input sequence tokens in the vocabulary.

            Indices can be obtained using [`AutoTokenizer`]. See [`PreTrainedTokenizer.encode`] and
            [`PreTrainedTokenizer.__call__`] for details.

            [What are input IDs?](../glossary#input-ids)
        scores (`torch.FloatTensor` of shape `(batch_size, config.vocab_size)`):
            Prediction scores of a language modeling head. These can be scores for each vocabulary token before SoftMax
            or scores for each vocabulary token after SoftMax.
        kwargs (`Dict[str, Any]`, *optional*):
            Additional stopping criteria specific kwargs.

    Return:
        `bool`. `False` indicates we should continue, `True` indicates we should stop.

"""

class 	lowerCamelCase_    ( _A						):






						'''simple docstring'''







						@add_start_docstrings(__lowerCamelCase )
						def __call__(	self      :			Optional[int]	,	__lowerCamelCase      :			torch.LongTensor	,	__lowerCamelCase      :			torch.FloatTensor	,	**__lowerCamelCase      :			Optional[Any] )      ->				bool:
									raise NotImplementedError("StoppingCriteria needs to be subclassed" )







class 	lowerCamelCase_    ( _A						):






						'''simple docstring'''







						def __init__(	self      :			List[str]	,	__lowerCamelCase      :			int	,	__lowerCamelCase      :			Optional[int] = None )      ->				List[Any]:
									A							:					str              =						max_length
									A							:					Optional[int]              =						max_position_embeddings







						@add_start_docstrings(__lowerCamelCase )
						def __call__(	self      :			List[str]	,	__lowerCamelCase      :			torch.LongTensor	,	__lowerCamelCase      :			torch.FloatTensor	,	**__lowerCamelCase      :			Any )      ->				bool:
									A							:					List[Any]              =						input_ids.shape[-1]
									A							:					Any              =						cur_len >= self.max_length
									if self.max_position_embeddings is not None and not is_done and cur_len >= self.max_position_embeddings:
												logger.warning_once(
												    "This is a friendly reminder - the current text generation call will exceed the model's predefined "
												    F"""maximum length ({self.max_position_embeddings}). Depending on the model, you may observe """
												    "exceptions, performance degradation, or nothing at all." )
									return is_done







class 	lowerCamelCase_    ( _A						):






						'''simple docstring'''







						def __init__(	self      :			Optional[Any]	,	__lowerCamelCase      :			int	,	__lowerCamelCase      :			int )      ->				List[Any]:
									warnings.warn(
									    "The class `MaxNewTokensCriteria` is deprecated. "
									    F"""Please use `MaxLengthCriteria(max_length={start_length + max_new_tokens})` """
									    "with `max_length = start_length + max_new_tokens` instead."	,	__lowerCamelCase	,	)
									A							:					str              =						start_length
									A							:					Optional[Any]              =						max_new_tokens
									A							:					Dict              =						start_length + max_new_tokens







						@add_start_docstrings(__lowerCamelCase )
						def __call__(	self      :			int	,	__lowerCamelCase      :			torch.LongTensor	,	__lowerCamelCase      :			torch.FloatTensor	,	**__lowerCamelCase      :			Tuple )      ->				bool:
									return input_ids.shape[-1] >= self.max_length







class 	lowerCamelCase_    ( _A						):






						'''simple docstring'''







						def __init__(	self      :			Optional[int]	,	__lowerCamelCase      :			float	,	__lowerCamelCase      :			Optional[float] = None )      ->				List[Any]:
									A							:					str              =						max_time
									A							:					Dict              =						time.time() if initial_timestamp is None else initial_timestamp







						@add_start_docstrings(__lowerCamelCase )
						def __call__(	self      :			Any	,	__lowerCamelCase      :			torch.LongTensor	,	__lowerCamelCase      :			torch.FloatTensor	,	**__lowerCamelCase      :			Tuple )      ->				bool:
									return time.time() - self.initial_timestamp > self.max_time







class 	lowerCamelCase_    ( _A						):






						'''simple docstring'''







						@add_start_docstrings(__lowerCamelCase )
						def __call__(	self      :			Union[str, Any]	,	__lowerCamelCase      :			torch.LongTensor	,	__lowerCamelCase      :			torch.FloatTensor	,	**__lowerCamelCase      :			int )      ->				bool:
									return any(criteria(__lowerCamelCase	,	__lowerCamelCase ) for criteria in self )







						@property
						def 			SCREAMING_SNAKE_CASE__		(	self      :			List[str] )      ->				Optional[int]:
									for stopping_criterium in self:
												if isinstance(__lowerCamelCase	,	__lowerCamelCase ):
															return stopping_criterium.max_length
												elif isinstance(__lowerCamelCase	,	__lowerCamelCase ):
															return stopping_criterium.max_length
									return None







def 	UpperCAmelCase   (						_lowerCamelCase ,    _lowerCamelCase    ):
			A							:					Optional[int]              =						stopping_criteria.max_length
			A							:					Any              =						deepcopy(_lowerCamelCase    )
			if stopping_max_length is not None and stopping_max_length != max_length:
						warnings.warn("You set different `max_length` for stopping criteria and `max_length` parameter" ,    _lowerCamelCase    )
			elif stopping_max_length is None:
						new_stopping_criteria.append(MaxLengthCriteria(max_length=_lowerCamelCase    )    )
			return new_stopping_criteria