





import tempfile
import unittest

from make_student import create_student_by_copying_alternating_layers

from transformers import AutoConfig
from transformers.file_utils import cached_property
from transformers.testing_utils import require_torch


__A				:    List[str]       =   """sshleifer/bart-tiny-random"""
__A				:    Union[str, Any]       =   """patrickvonplaten/t5-tiny-random"""

@require_torch
class 	A_       (unittest.TestCase			):
	@cached_property
	def      _lowercase				(    self		):






				'''simple docstring'''







				return AutoConfig.from_pretrained(_A		)
	def      _lowercase				(    self		):






				'''simple docstring'''







				UpperCAmelCase		,			*UpperCAmelCase   		=				create_student_by_copying_alternating_layers(_A							,					tempfile.mkdtemp()							,					e=1							,					d=1		)
				self.assertEqual(student.config.num_hidden_layers							,					1		)
	def      _lowercase				(    self		):






				'''simple docstring'''







				UpperCAmelCase		,			*UpperCAmelCase   		=				create_student_by_copying_alternating_layers(_A							,					tempfile.mkdtemp()							,					e=1							,					d=_A		)
	def      _lowercase				(    self		):






				'''simple docstring'''







				UpperCAmelCase		,			*UpperCAmelCase   		=				create_student_by_copying_alternating_layers(_A							,					tempfile.mkdtemp()							,					e=1							,					d=_A		)
				self.assertEqual(student.config.encoder_layers							,					1		)
				self.assertEqual(student.config.decoder_layers							,					self.teacher_config.encoder_layers		)
	def      _lowercase				(    self		):






				'''simple docstring'''







				UpperCAmelCase		,			*UpperCAmelCase   		=				create_student_by_copying_alternating_layers(_A							,					tempfile.mkdtemp()							,					e=1							,					d=1		)
				self.assertEqual(student.config.encoder_layers							,					1		)
				self.assertEqual(student.config.decoder_layers							,					1		)







	def      _lowercase				(    self		):






				'''simple docstring'''







				with self.assertRaises(_A		):
							create_student_by_copying_alternating_layers(_A							,					tempfile.mkdtemp()							,					e=_A							,					d=_A		)







'''simple docstring'''

from __future__ import annotations

from fractions import Fraction





def __snake_case					(      UpperCAmelCase_						:						int					,				UpperCAmelCase_						:						int		):
 return (
     num != den and num % 10 == den // 10 and (num // 10) / (den % 10) == num / den
 )





def __snake_case					(      UpperCAmelCase_						:						int		):
 lowerCamelCase_      =  []
 lowerCamelCase_      =  11
 lowerCamelCase_      =  int("1" + "0" * digit_len		)
 for num in range(UpperCAmelCase_					,				UpperCAmelCase_		):
  while den <= 99:
   if (num != den) and (num % 10 == den // 10) and (den % 10 != 0):
    if is_digit_cancelling(UpperCAmelCase_					,				UpperCAmelCase_		):
     solutions.append(F'''{num}/{den}'''		)
   den += 1
  num += 1
  lowerCamelCase_      =  10
 return solutions





def __snake_case					(      UpperCAmelCase_						:						int = 2		):
 lowerCamelCase_      =  1.0
 for fraction in fraction_list(UpperCAmelCase_		):
  lowerCamelCase_      =  Fraction(UpperCAmelCase_		)
  result *= frac.denominator / frac.numerator
 return int(UpperCAmelCase_		)


if __name__ == "__main__":
     print(solution())



