



"""simple docstring"""

from math import sqrt




def __lowercase			(							_a    ):
    assert isinstance(_a		,			_a    ) and (
        number >= 0
    ), "'number' must been an int and positive"

    snake_case_ :     Union[str, Any]				=	True

    # 0 and 1 are none primes.
    if number <= 1:
        snake_case_ :     Any				=	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:
            snake_case_ :     Union[str, Any]				=	False
            break

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

    return status




def __lowercase			(							_a    ):
    assert isinstance(_a		,			_a    ) and (n > 2), "'N' must been an int and > 2"

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

    snake_case_ :     int				=	[]  # 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):
                snake_case_ :     List[Any]				=	0

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

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

    return ans




def __lowercase			(							_a    ):
    assert isinstance(_a		,			_a    ) and (n > 2), "'N' must been an int and > 2"

    snake_case_ :     int				=	[]

    # 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 __lowercase			(							_a    ):
    assert isinstance(_a		,			_a    ) and number >= 0, "'number' must been an int and >= 0"

    snake_case_ :     Optional[Any]				=	[]  # this list will be returns of the function.

    # potential prime number factors.

    snake_case_ :     str				=	2

    snake_case_ :     int				=	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 __lowercase			(							_a    ):
    assert isinstance(_a		,			_a    ) and (
        number >= 0
    ), "'number' bust been an int and >= 0"

    snake_case_ :     Tuple				=	0

    # prime factorization of 'number'
    snake_case_ :     int				=	prime_factorization(_a    )

    snake_case_ :     Optional[int]				=	max(_a    )

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

    return ans




def __lowercase			(							_a    ):
    assert isinstance(_a		,			_a    ) and (
        number >= 0
    ), "'number' bust been an int and >= 0"

    snake_case_ :     Dict				=	0

    # prime factorization of 'number'
    snake_case_ :     Union[str, Any]				=	prime_factorization(_a    )

    snake_case_ :     List[Any]				=	min(_a    )

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

    return ans




def __lowercase			(							_a    ):
    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 __lowercase			(							_a    ):
    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 __lowercase			(							_a    ):
    assert (
        isinstance(_a		,			_a    ) and (number > 2) and is_even(_a    )
    ), "'number' must been an int, even and > 2"

    snake_case_ :     Dict				=	[]  # this list will returned

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

    # run variable for while-loops.
    snake_case_ :     Dict				=	0
    snake_case_ :     List[str]				=	None

    # exit variable. for break up the loops
    snake_case_ :     Union[str, Any]				=	True

    while i < len_pn and loop:
        snake_case_ :     List[Any]				=	i + 1

        while j < len_pn and loop:
            if prime_numbers[i] + prime_numbers[j] == number:
                snake_case_ :     Optional[Any]				=	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 __lowercase			(							_a		,			_a    ):
    assert (
        isinstance(_a		,			_a    )
        and isinstance(_a		,			_a    )
        and (numbera >= 0)
        and (numbera >= 0)
    ), "'number1' and 'number2' must been positive integer."

    snake_case_ :     Union[str, Any]				=	0

    while numbera != 0:
        snake_case_ :     Any				=	numbera % numbera
        snake_case_ :     int				=	numbera
        snake_case_ :     Union[str, Any]				=	rest

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

    return numbera




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

    snake_case_ :     List[str]				=	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'
        snake_case_ :     str				=	prime_factorization(_a    )
        snake_case_ :     int				=	prime_factorization(_a    )

    elif numbera == 1 or numbera == 1:
        snake_case_ :     List[str]				=	[]
        snake_case_ :     Optional[int]				=	[]
        snake_case_ :     Optional[Any]				=	max(_a		,			_a    )

    snake_case_ :     Tuple				=	0
    snake_case_ :     Tuple				=	0

    snake_case_ :     List[Any]				=	[]  # 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:
                snake_case_ :     Optional[int]				=	prime_fac_a.count(_a    )
                snake_case_ :     Dict				=	prime_fac_a.count(_a    )

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

            else:
                snake_case_ :     List[Any]				=	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:
            snake_case_ :     str				=	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 __lowercase			(							_a    ):
    assert isinstance(_a		,			_a    ) and (n >= 0), "'number' must been a positive int"

    snake_case_ :     Tuple				=	0
    snake_case_ :     Tuple				=	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 __lowercase			(							_a		,			_a    ):
    assert (
        is_prime(_a    ) and is_prime(_a    ) and (p_number_a < p_number_a)
    ), "The arguments must been prime numbers and 'pNumber1' < 'pNumber2'"

    snake_case_ :     str				=	p_number_a + 1  # jump to the next number

    snake_case_ :     str				=	[]  # 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 __lowercase			(							_a    ):
    assert isinstance(_a		,			_a    ) and (n >= 1), "'n' must been int and >= 1"

    snake_case_ :     List[Any]				=	[]  # 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 __lowercase			(							_a    ):
    assert isinstance(_a		,			_a    ) and (
        number > 1
    ), "'number' must been an int and >= 1"

    snake_case_ :     Tuple				=	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 __lowercase			(							_a		,			_a    ):
    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.
    snake_case_ :     List[str]				=	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 __lowercase			(							_a    ):
    assert isinstance(_a		,			_a    ) and (n >= 0), "'n' must been a int and >= 0"

    snake_case_ :     List[Any]				=	1  # this will be return.

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

    return ans






def __lowercase			(							_a    ):
    assert isinstance(_a		,			_a    ) and (n >= 0), "'n' must been an int and >= 0"

    snake_case_ :     Tuple				=	0
    snake_case_ :     str				=	1
    snake_case_ :     List[str]				=	1  # this will be return

    for _ in range(n - 1    ):
        snake_case_ :     Dict				=	ans
        ans += fiba
        snake_case_ :     int				=	tmp

    return ans










"""simple docstring"""

import shutil
import tempfile
import unittest
from unittest.mock import patch

from transformers import (
    DefaultFlowCallback,
    IntervalStrategy,
    PrinterCallback,
    ProgressCallback,
    Trainer,
    TrainerCallback,
    TrainingArguments,
    is_torch_available,
)
from transformers.testing_utils import require_torch


if is_torch_available():
     from transformers.trainer import DEFAULT_CALLBACKS

     from .test_trainer import RegressionDataset, RegressionModelConfig, RegressionPreTrainedModel




class        _UpperCAmelCase       (			lowerCAmelCase__):

 def __init__(     self		:       Optional[int]				):
     snake_case_ :     str				=	[]

 def 						_snake_case					(     self		:       List[Any]  ,     lowercase_		:       Any  ,     lowercase_		:       Union[str, Any]  ,     lowercase_		:       List[str]  ,     **lowercase_		:       Tuple				):
     self.events.append('''on_init_end'''				)

 def 						_snake_case					(     self		:       List[Any]  ,     lowercase_		:       str  ,     lowercase_		:       Optional[int]  ,     lowercase_		:       List[str]  ,     **lowercase_		:       List[str]				):
     self.events.append('''on_train_begin'''				)

 def 						_snake_case					(     self		:       Any  ,     lowercase_		:       List[str]  ,     lowercase_		:       Tuple  ,     lowercase_		:       List[Any]  ,     **lowercase_		:       Optional[int]				):
     self.events.append('''on_train_end'''				)

 def 						_snake_case					(     self		:       str  ,     lowercase_		:       Optional[int]  ,     lowercase_		:       int  ,     lowercase_		:       Optional[Any]  ,     **lowercase_		:       List[Any]				):
     self.events.append('''on_epoch_begin'''				)

 def 						_snake_case					(     self		:       Tuple  ,     lowercase_		:       List[str]  ,     lowercase_		:       Dict  ,     lowercase_		:       Union[str, Any]  ,     **lowercase_		:       Optional[Any]				):
     self.events.append('''on_epoch_end'''				)

 def 						_snake_case					(     self		:       List[str]  ,     lowercase_		:       Optional[Any]  ,     lowercase_		:       Optional[Any]  ,     lowercase_		:       int  ,     **lowercase_		:       Optional[Any]				):
     self.events.append('''on_step_begin'''				)

 def 						_snake_case					(     self		:       int  ,     lowercase_		:       int  ,     lowercase_		:       Union[str, Any]  ,     lowercase_		:       List[Any]  ,     **lowercase_		:       List[str]				):
     self.events.append('''on_step_end'''				)

 def 						_snake_case					(     self		:       str  ,     lowercase_		:       int  ,     lowercase_		:       Dict  ,     lowercase_		:       List[str]  ,     **lowercase_		:       List[str]				):
     self.events.append('''on_evaluate'''				)

 def 						_snake_case					(     self		:       Dict  ,     lowercase_		:       Union[str, Any]  ,     lowercase_		:       Any  ,     lowercase_		:       List[Any]  ,     **lowercase_		:       str				):
     self.events.append('''on_predict'''				)

 def 						_snake_case					(     self		:       List[Any]  ,     lowercase_		:       Union[str, Any]  ,     lowercase_		:       List[Any]  ,     lowercase_		:       int  ,     **lowercase_		:       Union[str, Any]				):
     self.events.append('''on_save'''				)

 def 						_snake_case					(     self		:       str  ,     lowercase_		:       Tuple  ,     lowercase_		:       Optional[int]  ,     lowercase_		:       List[str]  ,     **lowercase_		:       Any				):
     self.events.append('''on_log'''				)






 def 						_snake_case					(     self		:       Dict  ,     lowercase_		:       Optional[int]  ,     lowercase_		:       List[str]  ,     lowercase_		:       Union[str, Any]  ,     **lowercase_		:       Optional[int]				):
     self.events.append('''on_prediction_step'''				)





@require_torch
class        _UpperCAmelCase       (			unittest.TestCase):

 def 						_snake_case					(     self		:       List[str]				):
     snake_case_ :     Tuple				=	tempfile.mkdtemp()

 def 						_snake_case					(     self		:       Tuple				):
     shutil.rmtree(self.output_dir				)

 def 						_snake_case					(     self		:       int  ,     lowercase_		:       Union[str, Any]=0  ,     lowercase_		:       Dict=0  ,     lowercase_		:       List[str]=64  ,     lowercase_		:       Union[str, Any]=64  ,     lowercase_		:       Union[str, Any]=None  ,     lowercase_		:       Any=False  ,     **lowercase_		:       List[Any]				):
     # disable_tqdm in TrainingArguments has a flaky default since it depends on the level of logging. We make sure
     # its set to False since the tests later on depend on its value.
     snake_case_ :     int				=	RegressionDataset(length=lowercase_				)
     snake_case_ :     Any				=	RegressionDataset(length=lowercase_				)
     snake_case_ :     int				=	RegressionModelConfig(a=lowercase_  ,     b=lowercase_				)
     snake_case_ :     Tuple				=	RegressionPreTrainedModel(lowercase_				)

     snake_case_ :     Any				=	TrainingArguments(self.output_dir  ,     disable_tqdm=lowercase_  ,     report_to=[]  ,     **lowercase_				)
     return Trainer(
         lowercase_  ,     lowercase_  ,     train_dataset=lowercase_  ,     eval_dataset=lowercase_  ,     callbacks=lowercase_  ,     )

 def 						_snake_case					(     self		:       Optional[int]  ,     lowercase_		:       Any  ,     lowercase_		:       List[Any]				):
     self.assertEqual(len(lowercase_				)  ,     len(lowercase_				)				)

     # Order doesn't matter
     snake_case_ :     Any				=	sorted(lowercase_  ,     key=lambda lowercase_				: cb.__name__ if isinstance(lowercase_  ,     lowercase_				) else cb.__class__.__name__				)
     snake_case_ :     List[str]				=	sorted(lowercase_  ,     key=lambda lowercase_				: cb.__name__ if isinstance(lowercase_  ,     lowercase_				) else cb.__class__.__name__				)

     for cba, cba in zip(lowercase_  ,     lowercase_				):
         if isinstance(lowercase_  ,     lowercase_				) and isinstance(lowercase_  ,     lowercase_				):
             self.assertEqual(lowercase_  ,     lowercase_				)
         elif isinstance(lowercase_  ,     lowercase_				) and not isinstance(lowercase_  ,     lowercase_				):
             self.assertEqual(lowercase_  ,     cba.__class__				)
         elif not isinstance(lowercase_  ,     lowercase_				) and isinstance(lowercase_  ,     lowercase_				):
             self.assertEqual(cba.__class__  ,     lowercase_				)
         else:
             self.assertEqual(lowercase_  ,     lowercase_				)

 def 						_snake_case					(     self		:       Optional[Any]  ,     lowercase_		:       Tuple				):
     snake_case_ :     Tuple				=	['''on_init_end''', '''on_train_begin''']
     snake_case_ :     List[Any]				=	0
     snake_case_ :     Union[str, Any]				=	len(trainer.get_eval_dataloader()				)
     snake_case_ :     List[Any]				=	['''on_prediction_step'''] * len(trainer.get_eval_dataloader()				) + ['''on_log''', '''on_evaluate''']
     for _ in range(trainer.state.num_train_epochs				):
         expected_events.append('''on_epoch_begin'''				)
         for _ in range(lowercase_				):
             step += 1
             expected_events += ["on_step_begin", "on_step_end"]
             if step % trainer.args.logging_steps == 0:
                 expected_events.append('''on_log'''				)
             if trainer.args.evaluation_strategy == IntervalStrategy.STEPS and step % trainer.args.eval_steps == 0:
                 expected_events += evaluation_events.copy()
             if step % trainer.args.save_steps == 0:
                 expected_events.append('''on_save'''				)
         expected_events.append('''on_epoch_end'''				)
         if trainer.args.evaluation_strategy == IntervalStrategy.EPOCH:
             expected_events += evaluation_events.copy()
     expected_events += ["on_log", "on_train_end"]
     return expected_events

 def 						_snake_case					(     self		:       List[str]				):
     snake_case_ :     Union[str, Any]				=	self.get_trainer()
     snake_case_ :     Dict				=	DEFAULT_CALLBACKS.copy() + [ProgressCallback]
     self.check_callbacks_equality(trainer.callback_handler.callbacks  ,     lowercase_				)

     # Callbacks passed at init are added to the default callbacks
     snake_case_ :     Optional[Any]				=	self.get_trainer(callbacks=[MyTestTrainerCallback]				)
     expected_callbacks.append(lowercase_				)
     self.check_callbacks_equality(trainer.callback_handler.callbacks  ,     lowercase_				)

     # TrainingArguments.disable_tqdm controls if use ProgressCallback or PrinterCallback
     snake_case_ :     Optional[int]				=	self.get_trainer(disable_tqdm=lowercase_				)
     snake_case_ :     List[Any]				=	DEFAULT_CALLBACKS.copy() + [PrinterCallback]
     self.check_callbacks_equality(trainer.callback_handler.callbacks  ,     lowercase_				)

 def 						_snake_case					(     self		:       int				):
     snake_case_ :     int				=	DEFAULT_CALLBACKS.copy() + [ProgressCallback]
     snake_case_ :     List[Any]				=	self.get_trainer()

     # We can add, pop, or remove by class name
     trainer.remove_callback(lowercase_				)
     expected_callbacks.remove(lowercase_				)
     self.check_callbacks_equality(trainer.callback_handler.callbacks  ,     lowercase_				)

     snake_case_ :     Dict				=	self.get_trainer()
     snake_case_ :     Optional[int]				=	trainer.pop_callback(lowercase_				)
     self.assertEqual(cb.__class__  ,     lowercase_				)
     self.check_callbacks_equality(trainer.callback_handler.callbacks  ,     lowercase_				)

     trainer.add_callback(lowercase_				)
     expected_callbacks.insert(0  ,     lowercase_				)
     self.check_callbacks_equality(trainer.callback_handler.callbacks  ,     lowercase_				)

     # We can also add, pop, or remove by instance
     snake_case_ :     Optional[int]				=	self.get_trainer()
     snake_case_ :     List[Any]				=	trainer.callback_handler.callbacks[0]
     trainer.remove_callback(lowercase_				)
     expected_callbacks.remove(lowercase_				)
     self.check_callbacks_equality(trainer.callback_handler.callbacks  ,     lowercase_				)

     snake_case_ :     List[Any]				=	self.get_trainer()
     snake_case_ :     Optional[int]				=	trainer.callback_handler.callbacks[0]
     snake_case_ :     Optional[Any]				=	trainer.pop_callback(lowercase_				)
     self.assertEqual(lowercase_  ,     lowercase_				)
     self.check_callbacks_equality(trainer.callback_handler.callbacks  ,     lowercase_				)

     trainer.add_callback(lowercase_				)
     expected_callbacks.insert(0  ,     lowercase_				)
     self.check_callbacks_equality(trainer.callback_handler.callbacks  ,     lowercase_				)






 def 						_snake_case					(     self		:       List[Any]				):
     import warnings

     # XXX: for now ignore scatter_gather warnings in this test since it's not relevant to what's being tested
     warnings.simplefilter(action='''ignore'''  ,     category=lowercase_				)

     snake_case_ :     int				=	self.get_trainer(callbacks=[MyTestTrainerCallback]				)
     trainer.train()
     snake_case_ :     Union[str, Any]				=	trainer.callback_handler.callbacks[-2].events
     self.assertEqual(lowercase_  ,     self.get_expected_events(lowercase_				)				)

     # Independent log/save/eval
     snake_case_ :     int				=	self.get_trainer(callbacks=[MyTestTrainerCallback]  ,     logging_steps=5				)
     trainer.train()
     snake_case_ :     str				=	trainer.callback_handler.callbacks[-2].events
     self.assertEqual(lowercase_  ,     self.get_expected_events(lowercase_				)				)

     snake_case_ :     List[Any]				=	self.get_trainer(callbacks=[MyTestTrainerCallback]  ,     save_steps=5				)
     trainer.train()
     snake_case_ :     int				=	trainer.callback_handler.callbacks[-2].events
     self.assertEqual(lowercase_  ,     self.get_expected_events(lowercase_				)				)

     snake_case_ :     List[Any]				=	self.get_trainer(callbacks=[MyTestTrainerCallback]  ,     eval_steps=5  ,     evaluation_strategy='''steps'''				)
     trainer.train()
     snake_case_ :     Union[str, Any]				=	trainer.callback_handler.callbacks[-2].events
     self.assertEqual(lowercase_  ,     self.get_expected_events(lowercase_				)				)

     snake_case_ :     Union[str, Any]				=	self.get_trainer(callbacks=[MyTestTrainerCallback]  ,     evaluation_strategy='''epoch'''				)
     trainer.train()
     snake_case_ :     Dict				=	trainer.callback_handler.callbacks[-2].events
     self.assertEqual(lowercase_  ,     self.get_expected_events(lowercase_				)				)

     # A bit of everything
     snake_case_ :     str				=	self.get_trainer(
         callbacks=[MyTestTrainerCallback]  ,     logging_steps=3  ,     save_steps=10  ,     eval_steps=5  ,     evaluation_strategy='''steps'''  ,     )
     trainer.train()
     snake_case_ :     str				=	trainer.callback_handler.callbacks[-2].events
     self.assertEqual(lowercase_  ,     self.get_expected_events(lowercase_				)				)

     # warning should be emitted for duplicated callbacks
     with patch('''transformers.trainer_callback.logger.warning'''				) as warn_mock:
         snake_case_ :     Dict				=	self.get_trainer(
             callbacks=[MyTestTrainerCallback, MyTestTrainerCallback]  ,     )
         assert str(lowercase_				) in warn_mock.call_args[0][0]





