





'''simple docstring'''

from math import sqrt





def 						UpperCamelCase    (							_lowerCamelCase : int	):
				assert isinstance(_UpperCamelCase						,	_UpperCamelCase	) and (
				    number >= 0
				), "'number' must been an int and positive"

				A__    =      True

				# 0 and 1 are none primes.
				if number <= 1:
								A__    =      False

				for divisor in range(2						,	int(round(sqrt(_UpperCamelCase	)	)	) + 1	):
								# if 'number' divisible by 'divisor' then sets 'status'
								# of false and break up the loop.
								if number % divisor == 0:
												A__    =      False
												break

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

				return status





def 						UpperCamelCase    (							_lowerCamelCase : Tuple	):
				assert isinstance(_UpperCamelCase						,	_UpperCamelCase	) and (n > 2), "'N' must been an int and > 2"

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

				A__    =      []  # this list will be returns.

				# actual sieve of erathostenes
				for i in range(len(_UpperCamelCase	)	):
								for j in range(i + 1						,	len(_UpperCamelCase	)	):
												if (begin_list[i] != 0) and (begin_list[j] % begin_list[i] == 0):
																A__    =      0

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

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

				return ans





def 						UpperCamelCase    (							_lowerCamelCase : List[str]	):
				assert isinstance(_UpperCamelCase						,	_UpperCamelCase	) and (n > 2), "'N' must been an int and > 2"

				A__    =      []

				# 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(_UpperCamelCase	):
												ans.append(_UpperCamelCase	)

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

				return ans





def 						UpperCamelCase    (							_lowerCamelCase : Union[str, Any]	):
				assert isinstance(_UpperCamelCase						,	_UpperCamelCase	) and number >= 0, "'number' must been an int and >= 0"

				A__    =      []  # this list will be returns of the function.

				# potential prime number factors.

				A__    =      2

				A__    =      number

				if number == 0 or number == 1:
								ans.append(_UpperCamelCase	)

				# if 'number' not prime then builds the prime factorization of 'number'
				elif not is_prime(_UpperCamelCase	):
								while quotient != 1:
												if is_prime(_UpperCamelCase	) and (quotient % factor == 0):
																ans.append(_UpperCamelCase	)
																quotient /= factor
												else:
																factor += 1

				else:
								ans.append(_UpperCamelCase	)

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

				return ans





def 						UpperCamelCase    (							_lowerCamelCase : Optional[int]	):
				assert isinstance(_UpperCamelCase						,	_UpperCamelCase	) and (
				    number >= 0
				), "'number' bust been an int and >= 0"

				A__    =      0

				# prime factorization of 'number'
				A__    =      prime_factorization(_UpperCamelCase	)

				A__    =      max(_UpperCamelCase	)

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

				return ans





def 						UpperCamelCase    (							_lowerCamelCase : Union[str, Any]	):
				assert isinstance(_UpperCamelCase						,	_UpperCamelCase	) and (
				    number >= 0
				), "'number' bust been an int and >= 0"

				A__    =      0

				# prime factorization of 'number'
				A__    =      prime_factorization(_UpperCamelCase	)

				A__    =      min(_UpperCamelCase	)

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

				return ans





def 						UpperCamelCase    (							_lowerCamelCase : Tuple	):
				assert isinstance(_UpperCamelCase						,	_UpperCamelCase	), "'number' must been an int"
				assert isinstance(number % 2 == 0						,	_UpperCamelCase	), "compare bust been from type bool"

				return number % 2 == 0





def 						UpperCamelCase    (							_lowerCamelCase : Any	):
				assert isinstance(_UpperCamelCase						,	_UpperCamelCase	), "'number' must been an int"
				assert isinstance(number % 2 != 0						,	_UpperCamelCase	), "compare bust been from type bool"

				return number % 2 != 0





def 						UpperCamelCase    (							_lowerCamelCase : Optional[int]	):
				assert (
				    isinstance(_UpperCamelCase						,	_UpperCamelCase	) and (number > 2) and is_even(_UpperCamelCase	)
				), "'number' must been an int, even and > 2"

				A__    =      []  # this list will returned

				# creates a list of prime numbers between 2 up to 'number'
				A__    =      get_prime_numbers(_UpperCamelCase	)
				A__    =      len(_UpperCamelCase	)

				# run variable for while-loops.
				A__    =      0
				A__    =      None

				# exit variable. for break up the loops
				A__    =      True

				while i < len_pn and loop:
								A__    =      i + 1

								while j < len_pn and loop:
												if prime_numbers[i] + prime_numbers[j] == number:
																A__    =      False
																ans.append(prime_numbers[i]	)
																ans.append(prime_numbers[j]	)

												j += 1

								i += 1

				# precondition
				assert (
				    isinstance(_UpperCamelCase						,	_UpperCamelCase	)
				    and (len(_UpperCamelCase	) == 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 						UpperCamelCase    (							_lowerCamelCase : List[str]						,	_lowerCamelCase : Dict	):
				assert (
				    isinstance(_UpperCamelCase						,	_UpperCamelCase	)
				    and isinstance(_UpperCamelCase						,	_UpperCamelCase	)
				    and (numbera >= 0)
				    and (numbera >= 0)
				), "'number1' and 'number2' must been positive integer."

				A__    =      0

				while numbera != 0:
								A__    =      numbera % numbera
								A__    =      numbera
								A__    =      rest

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

				return numbera





def 						UpperCamelCase    (							_lowerCamelCase : Optional[Any]						,	_lowerCamelCase : List[str]	):
				assert (
				    isinstance(_UpperCamelCase						,	_UpperCamelCase	)
				    and isinstance(_UpperCamelCase						,	_UpperCamelCase	)
				    and (numbera >= 1)
				    and (numbera >= 1)
				), "'number1' and 'number2' must been positive integer."

				A__    =      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'
								A__    =      prime_factorization(_UpperCamelCase	)
								A__    =      prime_factorization(_UpperCamelCase	)

				elif numbera == 1 or numbera == 1:
								A__    =      []
								A__    =      []
								A__    =      max(_UpperCamelCase						,	_UpperCamelCase	)

				A__    =      0
				A__    =      0

				A__    =      []  # 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:
																A__    =      prime_fac_a.count(_UpperCamelCase	)
																A__    =      prime_fac_a.count(_UpperCamelCase	)

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

												else:
																A__    =      prime_fac_a.count(_UpperCamelCase	)

																for _ in range(_UpperCamelCase	):
																				ans *= n

												done.append(_UpperCamelCase	)

    # iterates through primeFac2
				for n in prime_fac_a:
								if n not in done:
												A__    =      prime_fac_a.count(_UpperCamelCase	)

												for _ in range(_UpperCamelCase	):
																ans *= n

												done.append(_UpperCamelCase	)

    # precondition
				assert isinstance(_UpperCamelCase						,	_UpperCamelCase	) and (
				    ans >= 0
				), "'ans' must been from type int and positive"

				return ans





def 						UpperCamelCase    (							_lowerCamelCase : Optional[Any]	):
				assert isinstance(_UpperCamelCase						,	_UpperCamelCase	) and (n >= 0), "'number' must been a positive int"

				A__    =      0
				A__    =      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(_UpperCamelCase	):
												ans += 1

    # precondition
				assert isinstance(_UpperCamelCase						,	_UpperCamelCase	) and is_prime(
				    _UpperCamelCase	), "'ans' must been a prime number and from type int"

				return ans





def 						UpperCamelCase    (							_lowerCamelCase : List[str]						,	_lowerCamelCase : Optional[Any]	):
				assert (
				    is_prime(_UpperCamelCase	) and is_prime(_UpperCamelCase	) and (p_number_a < p_number_a)
				), "The arguments must been prime numbers and 'pNumber1' < 'pNumber2'"

				A__    =      p_number_a + 1  # jump to the next number

				A__    =      []  # this list will be returns.

				# if number is not prime then
				# fetch the next prime number.
				while not is_prime(_UpperCamelCase	):
								number += 1

				while number < p_number_a:
								ans.append(_UpperCamelCase	)

								number += 1

								# fetch the next prime number.
								while not is_prime(_UpperCamelCase	):
												number += 1

    # precondition
				assert (
				    isinstance(_UpperCamelCase						,	_UpperCamelCase	)
				    and ans[0] != p_number_a
				    and ans[len(_UpperCamelCase	) - 1] != p_number_a
				), "'ans' must been a list without the arguments"

				# 'ans' contains not 'pNumber1' and 'pNumber2' !
				return ans





def 						UpperCamelCase    (							_lowerCamelCase : Any	):
				assert isinstance(_UpperCamelCase						,	_UpperCamelCase	) and (n >= 1), "'n' must been int and >= 1"

				A__    =      []  # will be returned.

				for divisor in range(1						,	n + 1	):
								if n % divisor == 0:
												ans.append(_UpperCamelCase	)

    # precondition
				assert ans[0] == 1 and ans[len(_UpperCamelCase	) - 1] == n, "Error in function getDivisiors(...)"

				return ans





def 						UpperCamelCase    (							_lowerCamelCase : Optional[int]	):
				assert isinstance(_UpperCamelCase						,	_UpperCamelCase	) and (
				    number > 1
				), "'number' must been an int and >= 1"

				A__    =      get_divisors(_UpperCamelCase	)

				# precondition
				assert (
				    isinstance(_UpperCamelCase						,	_UpperCamelCase	)
				    and (divisors[0] == 1)
				    and (divisors[len(_UpperCamelCase	) - 1] == number)
				), "Error in help-function getDivisiors(...)"

				# summed all divisors up to 'number' (exclusive), hence [:-1]
				return sum(divisors[:-1]	) == number





def 						UpperCamelCase    (							_lowerCamelCase : Dict						,	_lowerCamelCase : Dict	):
				assert (
				    isinstance(_UpperCamelCase						,	_UpperCamelCase	)
				    and isinstance(_UpperCamelCase						,	_UpperCamelCase	)
				    and (denominator != 0)
				), "The arguments must been from type int and 'denominator' != 0"

				# build the greatest common divisor of numerator and denominator.
				A__    =      gcd(abs(_UpperCamelCase	)						,	abs(_UpperCamelCase	)	)

				# precondition
				assert (
				    isinstance(_UpperCamelCase						,	_UpperCamelCase	)
				    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 						UpperCamelCase    (							_lowerCamelCase : Dict	):
				assert isinstance(_UpperCamelCase						,	_UpperCamelCase	) and (n >= 0), "'n' must been a int and >= 0"

				A__    =      1  # this will be return.

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

				return ans





def 						UpperCamelCase    (							_lowerCamelCase : Tuple	):
				assert isinstance(_UpperCamelCase						,	_UpperCamelCase	) and (n >= 0), "'n' must been an int and >= 0"

				A__    =      0
				A__    =      1
				A__    =      1  # this will be return

				for _ in range(n - 1	):
								A__    =      ans
								ans += fiba
								A__    =      tmp

				return ans










'''simple docstring'''

import tempfile

import torch

from diffusers import PNDMScheduler

from .test_schedulers import SchedulerCommonTest






class        UpperCAmelCase     (	UpperCamelCase__    ):
 __lowercase       		=    (PNDMScheduler,)
 __lowercase       		=    (("""num_inference_steps""", 50),)
 def 					UpperCAmelCase_							(    self				:List[str]						,	**lowercase_				:Optional[int]							)->							List[str]:
     A__    =      {
         "num_train_timesteps": 10_00,
         "beta_start": 0.0_0_0_1,
         "beta_end": 0.0_2,
         "beta_schedule": "linear",
     }

     config.update(**lowercase_							)
     return config
 def 					UpperCAmelCase_							(    self				:int						,	lowercase_				:Optional[int]=0						,	**lowercase_				:Any							)->							int:
     A__    =      dict(self.forward_default_kwargs							)
     A__    =      kwargs.pop("num_inference_steps"						,	lowercase_							)
     A__    =      self.dummy_sample
     A__    =      0.1 * sample
     A__    =      [residual + 0.2, residual + 0.1_5, residual + 0.1, residual + 0.0_5]

     for scheduler_class in self.scheduler_classes:
         A__    =      self.get_scheduler_config(**lowercase_							)
         A__    =      scheduler_class(**lowercase_							)
         scheduler.set_timesteps(lowercase_							)
         # copy over dummy past residuals
         A__    =      dummy_past_residuals[:]

         with tempfile.TemporaryDirectory() as tmpdirname:
             scheduler.save_config(lowercase_							)
             A__    =      scheduler_class.from_pretrained(lowercase_							)
             new_scheduler.set_timesteps(lowercase_							)
             # copy over dummy past residuals
             A__    =      dummy_past_residuals[:]

         A__    =      scheduler.step_prk(lowercase_						,	lowercase_						,	lowercase_						,	**lowercase_							).prev_sample
         A__    =      new_scheduler.step_prk(lowercase_						,	lowercase_						,	lowercase_						,	**lowercase_							).prev_sample

         assert torch.sum(torch.abs(output - new_output							)							) < 1E-5, "Scheduler outputs are not identical"

         A__    =      scheduler.step_plms(lowercase_						,	lowercase_						,	lowercase_						,	**lowercase_							).prev_sample
         A__    =      new_scheduler.step_plms(lowercase_						,	lowercase_						,	lowercase_						,	**lowercase_							).prev_sample

         assert torch.sum(torch.abs(output - new_output							)							) < 1E-5, "Scheduler outputs are not identical"
 def 					UpperCAmelCase_							(    self				:List[Any]							)->							Tuple:
     pass
 def 					UpperCAmelCase_							(    self				:Optional[Any]						,	lowercase_				:Optional[Any]=0						,	**lowercase_				:List[str]							)->							str:
     A__    =      dict(self.forward_default_kwargs							)
     A__    =      kwargs.pop("num_inference_steps"						,	lowercase_							)
     A__    =      self.dummy_sample
     A__    =      0.1 * sample
     A__    =      [residual + 0.2, residual + 0.1_5, residual + 0.1, residual + 0.0_5]

     for scheduler_class in self.scheduler_classes:
         A__    =      self.get_scheduler_config()
         A__    =      scheduler_class(**lowercase_							)
         scheduler.set_timesteps(lowercase_							)

         # copy over dummy past residuals (must be after setting timesteps)
         A__    =      dummy_past_residuals[:]

         with tempfile.TemporaryDirectory() as tmpdirname:
             scheduler.save_config(lowercase_							)
             A__    =      scheduler_class.from_pretrained(lowercase_							)
             # copy over dummy past residuals
             new_scheduler.set_timesteps(lowercase_							)

             # copy over dummy past residual (must be after setting timesteps)
             A__    =      dummy_past_residuals[:]

         A__    =      scheduler.step_prk(lowercase_						,	lowercase_						,	lowercase_						,	**lowercase_							).prev_sample
         A__    =      new_scheduler.step_prk(lowercase_						,	lowercase_						,	lowercase_						,	**lowercase_							).prev_sample

         assert torch.sum(torch.abs(output - new_output							)							) < 1E-5, "Scheduler outputs are not identical"

         A__    =      scheduler.step_plms(lowercase_						,	lowercase_						,	lowercase_						,	**lowercase_							).prev_sample
         A__    =      new_scheduler.step_plms(lowercase_						,	lowercase_						,	lowercase_						,	**lowercase_							).prev_sample

         assert torch.sum(torch.abs(output - new_output							)							) < 1E-5, "Scheduler outputs are not identical"
 def 					UpperCAmelCase_							(    self				:Optional[int]						,	**lowercase_				:Dict							)->							Optional[int]:
     A__    =      self.scheduler_classes[0]
     A__    =      self.get_scheduler_config(**lowercase_							)
     A__    =      scheduler_class(**lowercase_							)

     A__    =      10
     A__    =      self.dummy_model()
     A__    =      self.dummy_sample_deter
     scheduler.set_timesteps(lowercase_							)

     for i, t in enumerate(scheduler.prk_timesteps							):
         A__    =      model(lowercase_						,	lowercase_							)
         A__    =      scheduler.step_prk(lowercase_						,	lowercase_						,	lowercase_							).prev_sample

     for i, t in enumerate(scheduler.plms_timesteps							):
         A__    =      model(lowercase_						,	lowercase_							)
         A__    =      scheduler.step_plms(lowercase_						,	lowercase_						,	lowercase_							).prev_sample

     return sample
 def 					UpperCAmelCase_							(    self				:int							)->							Union[str, Any]:
     A__    =      dict(self.forward_default_kwargs							)

     A__    =      kwargs.pop("num_inference_steps"						,	lowercase_							)

     for scheduler_class in self.scheduler_classes:
         A__    =      self.get_scheduler_config()
         A__    =      scheduler_class(**lowercase_							)

         A__    =      self.dummy_sample
         A__    =      0.1 * sample

         if num_inference_steps is not None and hasattr(lowercase_						,	"set_timesteps"							):
             scheduler.set_timesteps(lowercase_							)
         elif num_inference_steps is not None and not hasattr(lowercase_						,	"set_timesteps"							):
             A__    =      num_inference_steps

         # copy over dummy past residuals (must be done after set_timesteps)
         A__    =      [residual + 0.2, residual + 0.1_5, residual + 0.1, residual + 0.0_5]
         A__    =      dummy_past_residuals[:]

         A__    =      scheduler.step_prk(lowercase_						,	0						,	lowercase_						,	**lowercase_							).prev_sample
         A__    =      scheduler.step_prk(lowercase_						,	1						,	lowercase_						,	**lowercase_							).prev_sample

         self.assertEqual(output_a.shape						,	sample.shape							)
         self.assertEqual(output_a.shape						,	output_a.shape							)

         A__    =      scheduler.step_plms(lowercase_						,	0						,	lowercase_						,	**lowercase_							).prev_sample
         A__    =      scheduler.step_plms(lowercase_						,	1						,	lowercase_						,	**lowercase_							).prev_sample

         self.assertEqual(output_a.shape						,	sample.shape							)
         self.assertEqual(output_a.shape						,	output_a.shape							)
 def 					UpperCAmelCase_							(    self				:Any							)->							Dict:
     for timesteps in [1_00, 10_00]:
         self.check_over_configs(num_train_timesteps=lowercase_							)
 def 					UpperCAmelCase_							(    self				:List[str]							)->							int:
     for steps_offset in [0, 1]:
         self.check_over_configs(steps_offset=lowercase_							)

     A__    =      self.scheduler_classes[0]
     A__    =      self.get_scheduler_config(steps_offset=1							)
     A__    =      scheduler_class(**lowercase_							)
     scheduler.set_timesteps(10							)
     assert torch.equal(
         scheduler.timesteps						,	torch.LongTensor(
             [9_01, 8_51, 8_51, 8_01, 8_01, 7_51, 7_51, 7_01, 7_01, 6_51, 6_51, 6_01, 6_01, 5_01, 4_01, 3_01, 2_01, 1_01, 1]							)						,	)
 def 					UpperCAmelCase_							(    self				:Optional[Any]							)->							Any:
     for beta_start, beta_end in zip([0.0_0_0_1, 0.0_0_1]						,	[0.0_0_2, 0.0_2]							):
         self.check_over_configs(beta_start=lowercase_						,	beta_end=lowercase_							)
 def 					UpperCAmelCase_							(    self				:Tuple							)->							Tuple:
     for schedule in ["linear", "squaredcos_cap_v2"]:
         self.check_over_configs(beta_schedule=lowercase_							)
 def 					UpperCAmelCase_							(    self				:Optional[Any]							)->							Tuple:
     for prediction_type in ["epsilon", "v_prediction"]:
         self.check_over_configs(prediction_type=lowercase_							)
 def 					UpperCAmelCase_							(    self				:Optional[int]							)->							Tuple:
     for t in [1, 5, 10]:
         self.check_over_forward(time_step=lowercase_							)
 def 					UpperCAmelCase_							(    self				:List[Any]							)->							Optional[int]:
     for t, num_inference_steps in zip([1, 5, 10]						,	[10, 50, 1_00]							):
         self.check_over_forward(num_inference_steps=lowercase_							)
 def 					UpperCAmelCase_							(    self				:List[str]							)->							str:
     # earlier version of set_timesteps() caused an error indexing alpha's with inference steps as power of 3
     A__    =      27

     for scheduler_class in self.scheduler_classes:
         A__    =      self.dummy_sample
         A__    =      0.1 * sample

         A__    =      self.get_scheduler_config()
         A__    =      scheduler_class(**lowercase_							)

         scheduler.set_timesteps(lowercase_							)

         # before power of 3 fix, would error on first step, so we only need to do two
         for i, t in enumerate(scheduler.prk_timesteps[:2]							):
             A__    =      scheduler.step_prk(lowercase_						,	lowercase_						,	lowercase_							).prev_sample
 def 					UpperCAmelCase_							(    self				:List[str]							)->							str:
     with self.assertRaises(lowercase_							):
         A__    =      self.scheduler_classes[0]
         A__    =      self.get_scheduler_config()
         A__    =      scheduler_class(**lowercase_							)

         scheduler.step_plms(self.dummy_sample						,	1						,	self.dummy_sample							).prev_sample
 def 					UpperCAmelCase_							(    self				:int							)->							str:
     A__    =      self.full_loop()
     A__    =      torch.sum(torch.abs(lowercase_							)							)
     A__    =      torch.mean(torch.abs(lowercase_							)							)

     assert abs(result_sum.item() - 1_9_8.1_3_1_8							) < 1E-2
     assert abs(result_mean.item() - 0.2_5_8_0							) < 1E-3
 def 					UpperCAmelCase_							(    self				:Optional[Any]							)->							List[Any]:
     A__    =      self.full_loop(prediction_type="v_prediction"							)
     A__    =      torch.sum(torch.abs(lowercase_							)							)
     A__    =      torch.mean(torch.abs(lowercase_							)							)

     assert abs(result_sum.item() - 6_7.3_9_8_6							) < 1E-2
     assert abs(result_mean.item() - 0.0_8_7_8							) < 1E-3
 def 					UpperCAmelCase_							(    self				:Tuple							)->							Tuple:
     # We specify different beta, so that the first alpha is 0.99
     A__    =      self.full_loop(set_alpha_to_one=lowercase_						,	beta_start=0.0_1							)
     A__    =      torch.sum(torch.abs(lowercase_							)							)
     A__    =      torch.mean(torch.abs(lowercase_							)							)

     assert abs(result_sum.item() - 2_3_0.0_3_9_9							) < 1E-2
     assert abs(result_mean.item() - 0.2_9_9_5							) < 1E-3



 def 					UpperCAmelCase_							(    self				:Dict							)->							Any:
     # We specify different beta, so that the first alpha is 0.99
     A__    =      self.full_loop(set_alpha_to_one=lowercase_						,	beta_start=0.0_1							)
     A__    =      torch.sum(torch.abs(lowercase_							)							)
     A__    =      torch.mean(torch.abs(lowercase_							)							)

     assert abs(result_sum.item() - 1_8_6.9_4_8_2							) < 1E-2
     assert abs(result_mean.item() - 0.2_4_3_4							) < 1E-3



