


'''simple docstring'''




import inspect
import unittest

import numpy as np

from transformers import BeitConfig
from transformers.testing_utils import require_flax, require_vision, slow
from transformers.utils import cached_property, is_flax_available, is_vision_available

from ...test_configuration_common import ConfigTester
from ...test_modeling_flax_common import FlaxModelTesterMixin, floats_tensor, ids_tensor


if is_flax_available():
       import jax

       from transformers import FlaxBeitForImageClassification, FlaxBeitForMaskedImageModeling, FlaxBeitModel

if is_vision_available():
       from PIL import Image

       from transformers import BeitImageProcessor

class 		UpperCAmelCase_      (  unittest.TestCase		):





     def __init__( self       :      Tuple    ,      UpperCAmelCase__       :      Optional[int]    ,      UpperCAmelCase__       :      str=1_0_0    ,      UpperCAmelCase__       :      str=1_3    ,      UpperCAmelCase__       :      Dict=3_0    ,      UpperCAmelCase__       :      Dict=2    ,      UpperCAmelCase__       :      int=3    ,      UpperCAmelCase__       :      Any=True    ,      UpperCAmelCase__       :      Tuple=True    ,      UpperCAmelCase__       :      Union[str, Any]=3_2    ,      UpperCAmelCase__       :      List[str]=5    ,      UpperCAmelCase__       :      Any=4    ,      UpperCAmelCase__       :      List[str]=3_7    ,      UpperCAmelCase__       :      Any="gelu"    ,      UpperCAmelCase__       :      int=0.1    ,      UpperCAmelCase__       :      Any=0.1    ,      UpperCAmelCase__       :      Optional[int]=1_0    ,      UpperCAmelCase__       :      Union[str, Any]=0.02    ,      UpperCAmelCase__       :      Tuple=3    ,      )				->  Dict:
        lowerCAmelCase     =			parent
        lowerCAmelCase     =			vocab_size
        lowerCAmelCase     =			batch_size
        lowerCAmelCase     =			image_size
        lowerCAmelCase     =			patch_size
        lowerCAmelCase     =			num_channels
        lowerCAmelCase     =			is_training
        lowerCAmelCase     =			use_labels
        lowerCAmelCase     =			hidden_size
        lowerCAmelCase     =			num_hidden_layers
        lowerCAmelCase     =			num_attention_heads
        lowerCAmelCase     =			intermediate_size
        lowerCAmelCase     =			hidden_act
        lowerCAmelCase     =			hidden_dropout_prob
        lowerCAmelCase     =			attention_probs_dropout_prob
        lowerCAmelCase     =			type_sequence_label_size
        lowerCAmelCase     =			initializer_range

        # in BeiT, the seq length equals the number of patches + 1 (we add 1 for the [CLS] token)
        lowerCAmelCase     =			(image_size // patch_size) ** 2
        lowerCAmelCase     =			num_patches + 1





     def 							__UpperCAmelCase      ( self       :      List[Any]    )				->  List[str]:
        lowerCAmelCase     =			floats_tensor([self.batch_size, self.num_channels, self.image_size, self.image_size]    )

        lowerCAmelCase     =			None
        if self.use_labels:
           lowerCAmelCase     =			ids_tensor([self.batch_size]    ,      self.type_sequence_label_size    )

        lowerCAmelCase     =			BeitConfig(
            vocab_size=self.vocab_size    ,      image_size=self.image_size    ,      patch_size=self.patch_size    ,      num_channels=self.num_channels    ,      hidden_size=self.hidden_size    ,      num_hidden_layers=self.num_hidden_layers    ,      num_attention_heads=self.num_attention_heads    ,      intermediate_size=self.intermediate_size    ,      hidden_act=self.hidden_act    ,      hidden_dropout_prob=self.hidden_dropout_prob    ,      attention_probs_dropout_prob=self.attention_probs_dropout_prob    ,      is_decoder=UpperCAmelCase__    ,      initializer_range=self.initializer_range    ,      )

        return config, pixel_values, labels





     def 							__UpperCAmelCase      ( self       :      List[Any]    ,      UpperCAmelCase__       :      Optional[int]    ,      UpperCAmelCase__       :      Optional[Any]    ,      UpperCAmelCase__       :      int    )				->  str:
        lowerCAmelCase     =			FlaxBeitModel(config=UpperCAmelCase__    )
        lowerCAmelCase     =			model(UpperCAmelCase__    )
        self.parent.assertEqual(result.last_hidden_state.shape    ,      (self.batch_size, self.seq_length, self.hidden_size)    )





     def 							__UpperCAmelCase      ( self       :      str    ,      UpperCAmelCase__       :      Optional[Any]    ,      UpperCAmelCase__       :      Optional[Any]    ,      UpperCAmelCase__       :      Optional[int]    )				->  Any:
        lowerCAmelCase     =			FlaxBeitForMaskedImageModeling(config=UpperCAmelCase__    )
        lowerCAmelCase     =			model(UpperCAmelCase__    )
        self.parent.assertEqual(result.logits.shape    ,      (self.batch_size, self.seq_length - 1, self.vocab_size)    )





     def 							__UpperCAmelCase      ( self       :      str    ,      UpperCAmelCase__       :      Dict    ,      UpperCAmelCase__       :      Dict    ,      UpperCAmelCase__       :      str    )				->  Optional[int]:
        lowerCAmelCase     =			self.type_sequence_label_size
        lowerCAmelCase     =			FlaxBeitForImageClassification(config=UpperCAmelCase__    )
        lowerCAmelCase     =			model(UpperCAmelCase__    )
        self.parent.assertEqual(result.logits.shape    ,      (self.batch_size, self.type_sequence_label_size)    )

        # test greyscale images
        lowerCAmelCase     =			1
        lowerCAmelCase     =			FlaxBeitForImageClassification(UpperCAmelCase__    )

        lowerCAmelCase     =			floats_tensor([self.batch_size, 1, self.image_size, self.image_size]    )
        lowerCAmelCase     =			model(UpperCAmelCase__    )





     def 							__UpperCAmelCase      ( self       :      Any    )				->  str:
        lowerCAmelCase     =			self.prepare_config_and_inputs()
        (
            (
            lowerCAmelCase
        )     ,  (
            lowerCAmelCase
        )     ,  (
            lowerCAmelCase
        )     ,  
        )     =			config_and_inputs
        lowerCAmelCase     =			{'pixel_values': pixel_values}
        return config, inputs_dict




@require_flax
class 		UpperCAmelCase_      (  __lowercase       ,	unittest.TestCase		):
     lowerCamelCase				:	List[str]		=     (
         (FlaxBeitModel, FlaxBeitForImageClassification, FlaxBeitForMaskedImageModeling) if is_flax_available() else ()
     )





     def 							__UpperCAmelCase      ( self       :      Any    )				->  None:
        lowerCAmelCase     =			FlaxBeitModelTester(self    )
        lowerCAmelCase     =			ConfigTester(self    ,      config_class=UpperCAmelCase__    ,      has_text_modality=UpperCAmelCase__    ,      hidden_size=3_7    )





     def 							__UpperCAmelCase      ( self       :      List[Any]    )				->  List[Any]:
        self.config_tester.run_common_tests()





     def 							__UpperCAmelCase      ( self       :      Optional[int]    )				->  Tuple:
        lowerCAmelCase     ,  lowerCAmelCase     =			self.model_tester.prepare_config_and_inputs_for_common()

        for model_class in self.all_model_classes:
           lowerCAmelCase     =			model_class(UpperCAmelCase__    )
           lowerCAmelCase     =			inspect.signature(model.__call__    )
           # signature.parameters is an OrderedDict => so arg_names order is deterministic
           lowerCAmelCase     =			[*signature.parameters.keys()]

           lowerCAmelCase     =			['pixel_values']
           self.assertListEqual(arg_names[:1]    ,      UpperCAmelCase__    )





     def 							__UpperCAmelCase      ( self       :      Any    )				->  Union[str, Any]:
        lowerCAmelCase     ,  lowerCAmelCase     =			self.model_tester.prepare_config_and_inputs_for_common()

        for model_class in self.all_model_classes:
           with self.subTest(model_class.__name__    ):
              lowerCAmelCase     =			self._prepare_for_class(UpperCAmelCase__    ,      UpperCAmelCase__    )
              lowerCAmelCase     =			model_class(UpperCAmelCase__    )

              @jax.jit
              def model_jitted(UpperCAmelCase__       :      Dict    ,      **UpperCAmelCase__       :      Optional[int]    ):
                 return model(pixel_values=UpperCAmelCase__    ,      **UpperCAmelCase__    )

              with self.subTest('JIT Enabled'    ):
                 lowerCAmelCase     =			model_jitted(**UpperCAmelCase__    ).to_tuple()

              with self.subTest('JIT Disabled'    ):
                 with jax.disable_jit():
                    lowerCAmelCase     =			model_jitted(**UpperCAmelCase__    ).to_tuple()

              self.assertEqual(len(UpperCAmelCase__    )    ,      len(UpperCAmelCase__    )    )
              for jitted_output, output in zip(UpperCAmelCase__    ,      UpperCAmelCase__    ):
                 self.assertEqual(jitted_output.shape    ,      output.shape    )





     def 							__UpperCAmelCase      ( self       :      Dict    )				->  Optional[Any]:
        lowerCAmelCase     =			self.model_tester.prepare_config_and_inputs()
        self.model_tester.create_and_check_model(*UpperCAmelCase__    )





     def 							__UpperCAmelCase      ( self       :      Optional[int]    )				->  str:
        lowerCAmelCase     =			self.model_tester.prepare_config_and_inputs()
        self.model_tester.create_and_check_for_masked_lm(*UpperCAmelCase__    )





     def 							__UpperCAmelCase      ( self       :      List[str]    )				->  Dict:
        lowerCAmelCase     =			self.model_tester.prepare_config_and_inputs()
        self.model_tester.create_and_check_for_image_classification(*UpperCAmelCase__    )





     @slow
     def 							__UpperCAmelCase      ( self       :      str    )				->  Optional[Any]:
        for model_class_name in self.all_model_classes:
           lowerCAmelCase     =			model_class_name.from_pretrained('microsoft/beit-base-patch16-224'    )
           lowerCAmelCase     =			model(np.ones((1, 3, 2_2_4, 2_2_4)    )    )
           self.assertIsNotNone(UpperCAmelCase__    )





def 	a_					( ):
   lowerCAmelCase     =			Image.open('./tests/fixtures/tests_samples/COCO/000000039769.png'				)
   return image




@require_vision
@require_flax
class 		UpperCAmelCase_      (  unittest.TestCase		):





     @cached_property
     def 							__UpperCAmelCase      ( self       :      str    )				->  str:
        return BeitImageProcessor.from_pretrained('microsoft/beit-base-patch16-224'    ) if is_vision_available() else None





     @slow
     def 							__UpperCAmelCase      ( self       :      Dict    )				->  int:
        lowerCAmelCase     =			FlaxBeitForMaskedImageModeling.from_pretrained('microsoft/beit-base-patch16-224-pt22k'    )

        lowerCAmelCase     =			self.default_image_processor
        lowerCAmelCase     =			prepare_img()
        lowerCAmelCase     =			image_processor(images=UpperCAmelCase__    ,      return_tensors='np'    ).pixel_values

        # prepare bool_masked_pos
        lowerCAmelCase     =			np.ones((1, 1_9_6)    ,      dtype=UpperCAmelCase__    )

        # forward pass
        lowerCAmelCase     =			model(pixel_values=UpperCAmelCase__    ,      bool_masked_pos=UpperCAmelCase__    )
        lowerCAmelCase     =			outputs.logits

        # verify the logits
        lowerCAmelCase     =			(1, 1_9_6, 8_1_9_2)
        self.assertEqual(logits.shape    ,      UpperCAmelCase__    )

        lowerCAmelCase     =			np.array(
            [[-3.2_437, 0.5_072, -13.9_174], [-3.2_456, 0.4_948, -13.9_401], [-3.2_033, 0.5_121, -13.8_550]]    )

        self.assertTrue(np.allclose(logits[bool_masked_pos][:3, :3]    ,      UpperCAmelCase__    ,      atol=1E-2    )    )





     @slow
     def 							__UpperCAmelCase      ( self       :      Any    )				->  List[str]:
        lowerCAmelCase     =			FlaxBeitForImageClassification.from_pretrained('microsoft/beit-base-patch16-224'    )

        lowerCAmelCase     =			self.default_image_processor
        lowerCAmelCase     =			prepare_img()
        lowerCAmelCase     =			image_processor(images=UpperCAmelCase__    ,      return_tensors='np'    )

        # forward pass
        lowerCAmelCase     =			model(**UpperCAmelCase__    )
        lowerCAmelCase     =			outputs.logits

        # verify the logits
        lowerCAmelCase     =			(1, 1_0_0_0)
        self.assertEqual(logits.shape    ,      UpperCAmelCase__    )

        lowerCAmelCase     =			np.array([-1.2_385, -1.0_987, -1.0_108]    )

        self.assertTrue(np.allclose(logits[0, :3]    ,      UpperCAmelCase__    ,      atol=1E-4    )    )

        lowerCAmelCase     =			2_8_1
        self.assertEqual(logits.argmax(-1    ).item()    ,      UpperCAmelCase__    )





     @slow
     def 							__UpperCAmelCase      ( self       :      int    )				->  str:
        lowerCAmelCase     =			FlaxBeitForImageClassification.from_pretrained('microsoft/beit-large-patch16-224-pt22k-ft22k'    )

        lowerCAmelCase     =			self.default_image_processor
        lowerCAmelCase     =			prepare_img()
        lowerCAmelCase     =			image_processor(images=UpperCAmelCase__    ,      return_tensors='np'    )

        # forward pass
        lowerCAmelCase     =			model(**UpperCAmelCase__    )
        lowerCAmelCase     =			outputs.logits

        # verify the logits
        lowerCAmelCase     =			(1, 2_1_8_4_1)
        self.assertEqual(logits.shape    ,      UpperCAmelCase__    )

        lowerCAmelCase     =			np.array([1.6_881, -0.2_787, 0.5_901]    )

        self.assertTrue(np.allclose(logits[0, :3]    ,      UpperCAmelCase__    ,      atol=1E-4    )    )

        lowerCAmelCase     =			2_3_9_6
        self.assertEqual(logits.argmax(-1    ).item()    ,      UpperCAmelCase__    )









'''simple docstring'''






import tempfile

import torch

from diffusers import IPNDMScheduler

from .test_schedulers import SchedulerCommonTest






class    __snake_case       (   _SCREAMING_SNAKE_CASE):







    """simple docstring"""



    lowercase    =					(IPNDMScheduler,)
    lowercase    =					(('num_inference_steps', 50),)

    def __lowercase   (   self    :  Optional[Any]    ,						**lowerCamelCase    :  int		)   ->  Tuple:
      lowerCAmelCase_			:      Dict			=   {"""num_train_timesteps""": 10_00}
      config.update(**lowerCamelCase		)
      return config

    def __lowercase   (   self    :  Dict    ,						lowerCamelCase    :  Tuple=0    ,						**lowerCamelCase    :  Union[str, Any]		)   ->  Optional[Any]:
      lowerCAmelCase_			:      Optional[Any]			=   dict(self.forward_default_kwargs		)
      lowerCAmelCase_			:      Dict			=   kwargs.pop("""num_inference_steps"""    ,						lowerCamelCase		)
      lowerCAmelCase_			:      List[str]			=   self.dummy_sample
      lowerCAmelCase_			:      Optional[int]			=   0.1 * sample
      lowerCAmelCase_			:      int			=   [residual + 0.2, residual + 0.15, residual + 0.1, residual + 0.05]

      for scheduler_class in self.scheduler_classes:
        lowerCAmelCase_			:      List[str]			=   self.get_scheduler_config(**lowerCamelCase		)
        lowerCAmelCase_			:      int			=   scheduler_class(**lowerCamelCase		)
        scheduler.set_timesteps(lowerCamelCase		)
        # copy over dummy past residuals
        lowerCAmelCase_			:      Optional[int]			=   dummy_past_residuals[:]

        if time_step is None:
          lowerCAmelCase_			:      Optional[Any]			=   scheduler.timesteps[len(scheduler.timesteps		) // 2]

        with tempfile.TemporaryDirectory() as tmpdirname:
          scheduler.save_config(lowerCamelCase		)
          lowerCAmelCase_			:      List[Any]			=   scheduler_class.from_pretrained(lowerCamelCase		)
          new_scheduler.set_timesteps(lowerCamelCase		)
          # copy over dummy past residuals
          lowerCAmelCase_			:      str			=   dummy_past_residuals[:]

        lowerCAmelCase_			:      int			=   scheduler.step(lowerCamelCase    ,						lowerCamelCase    ,						lowerCamelCase    ,						**lowerCamelCase		).prev_sample
        lowerCAmelCase_			:      Dict			=   new_scheduler.step(lowerCamelCase    ,						lowerCamelCase    ,						lowerCamelCase    ,						**lowerCamelCase		).prev_sample

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

        lowerCAmelCase_			:      List[str]			=   scheduler.step(lowerCamelCase    ,						lowerCamelCase    ,						lowerCamelCase    ,						**lowerCamelCase		).prev_sample
        lowerCAmelCase_			:      Any			=   new_scheduler.step(lowerCamelCase    ,						lowerCamelCase    ,						lowerCamelCase    ,						**lowerCamelCase		).prev_sample

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

    def __lowercase   (   self    :  str		)   ->  Tuple:
      pass

    def __lowercase   (   self    :  Tuple    ,						lowerCamelCase    :  int=0    ,						**lowerCamelCase    :  Any		)   ->  int:
      lowerCAmelCase_			:      Optional[int]			=   dict(self.forward_default_kwargs		)
      lowerCAmelCase_			:      List[str]			=   kwargs.pop("""num_inference_steps"""    ,						lowerCamelCase		)
      lowerCAmelCase_			:      Tuple			=   self.dummy_sample
      lowerCAmelCase_			:      Optional[int]			=   0.1 * sample
      lowerCAmelCase_			:      List[Any]			=   [residual + 0.2, residual + 0.15, residual + 0.1, residual + 0.05]

      for scheduler_class in self.scheduler_classes:
        lowerCAmelCase_			:      Optional[int]			=   self.get_scheduler_config()
        lowerCAmelCase_			:      Optional[int]			=   scheduler_class(**lowerCamelCase		)
        scheduler.set_timesteps(lowerCamelCase		)

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

        if time_step is None:
          lowerCAmelCase_			:      Optional[Any]			=   scheduler.timesteps[len(scheduler.timesteps		) // 2]

        with tempfile.TemporaryDirectory() as tmpdirname:
          scheduler.save_config(lowerCamelCase		)
          lowerCAmelCase_			:      Optional[Any]			=   scheduler_class.from_pretrained(lowerCamelCase		)
          # copy over dummy past residuals
          new_scheduler.set_timesteps(lowerCamelCase		)

          # copy over dummy past residual (must be after setting timesteps)
          lowerCAmelCase_			:      Union[str, Any]			=   dummy_past_residuals[:]

        lowerCAmelCase_			:      Any			=   scheduler.step(lowerCamelCase    ,						lowerCamelCase    ,						lowerCamelCase    ,						**lowerCamelCase		).prev_sample
        lowerCAmelCase_			:      Optional[Any]			=   new_scheduler.step(lowerCamelCase    ,						lowerCamelCase    ,						lowerCamelCase    ,						**lowerCamelCase		).prev_sample

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

        lowerCAmelCase_			:      List[str]			=   scheduler.step(lowerCamelCase    ,						lowerCamelCase    ,						lowerCamelCase    ,						**lowerCamelCase		).prev_sample
        lowerCAmelCase_			:      str			=   new_scheduler.step(lowerCamelCase    ,						lowerCamelCase    ,						lowerCamelCase    ,						**lowerCamelCase		).prev_sample

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

    def __lowercase   (   self    :  Optional[int]    ,						**lowerCamelCase    :  Optional[Any]		)   ->  str:
      lowerCAmelCase_			:      Optional[int]			=   self.scheduler_classes[0]
      lowerCAmelCase_			:      List[Any]			=   self.get_scheduler_config(**lowerCamelCase		)
      lowerCAmelCase_			:      str			=   scheduler_class(**lowerCamelCase		)

      lowerCAmelCase_			:      Dict			=   10
      lowerCAmelCase_			:      Optional[int]			=   self.dummy_model()
      lowerCAmelCase_			:      Tuple			=   self.dummy_sample_deter
      scheduler.set_timesteps(lowerCamelCase		)

      for i, t in enumerate(scheduler.timesteps		):
        lowerCAmelCase_			:      Optional[Any]			=   model(lowerCamelCase    ,						lowerCamelCase		)
        lowerCAmelCase_			:      str			=   scheduler.step(lowerCamelCase    ,						lowerCamelCase    ,						lowerCamelCase		).prev_sample

      for i, t in enumerate(scheduler.timesteps		):
        lowerCAmelCase_			:      Dict			=   model(lowerCamelCase    ,						lowerCamelCase		)
        lowerCAmelCase_			:      List[str]			=   scheduler.step(lowerCamelCase    ,						lowerCamelCase    ,						lowerCamelCase		).prev_sample

      return sample

    def __lowercase   (   self    :  Tuple		)   ->  Dict:
      lowerCAmelCase_			:      List[Any]			=   dict(self.forward_default_kwargs		)

      lowerCAmelCase_			:      int			=   kwargs.pop("""num_inference_steps"""    ,						lowerCamelCase		)

      for scheduler_class in self.scheduler_classes:
        lowerCAmelCase_			:      Tuple			=   self.get_scheduler_config()
        lowerCAmelCase_			:      List[str]			=   scheduler_class(**lowerCamelCase		)

        lowerCAmelCase_			:      int			=   self.dummy_sample
        lowerCAmelCase_			:      Tuple			=   0.1 * sample

        if num_inference_steps is not None and hasattr(lowerCamelCase    ,						"""set_timesteps"""		):
          scheduler.set_timesteps(lowerCamelCase		)
        elif num_inference_steps is not None and not hasattr(lowerCamelCase    ,						"""set_timesteps"""		):
          lowerCAmelCase_			:      Dict			=   num_inference_steps

        # copy over dummy past residuals (must be done after set_timesteps)
        lowerCAmelCase_			:      int			=   [residual + 0.2, residual + 0.15, residual + 0.1, residual + 0.05]
        lowerCAmelCase_			:      List[str]			=   dummy_past_residuals[:]

        lowerCAmelCase_			:      List[str]			=   scheduler.timesteps[5]
        lowerCAmelCase_			:      str			=   scheduler.timesteps[6]

        lowerCAmelCase_			:      Dict			=   scheduler.step(lowerCamelCase    ,						lowerCamelCase    ,						lowerCamelCase    ,						**lowerCamelCase		).prev_sample
        lowerCAmelCase_			:      List[str]			=   scheduler.step(lowerCamelCase    ,						lowerCamelCase    ,						lowerCamelCase    ,						**lowerCamelCase		).prev_sample

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

        lowerCAmelCase_			:      Any			=   scheduler.step(lowerCamelCase    ,						lowerCamelCase    ,						lowerCamelCase    ,						**lowerCamelCase		).prev_sample
        lowerCAmelCase_			:      Optional[int]			=   scheduler.step(lowerCamelCase    ,						lowerCamelCase    ,						lowerCamelCase    ,						**lowerCamelCase		).prev_sample

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

    def __lowercase   (   self    :  Any		)   ->  int:
      for timesteps in [1_00, 10_00]:
        self.check_over_configs(num_train_timesteps=lowerCamelCase    ,						time_step=lowerCamelCase		)

    def __lowercase   (   self    :  Optional[int]		)   ->  Optional[int]:
      for t, num_inference_steps in zip([1, 5, 10]    ,						[10, 50, 1_00]		):
        self.check_over_forward(num_inference_steps=lowerCamelCase    ,						time_step=lowerCamelCase		)





    def __lowercase   (   self    :  int		)   ->  List[Any]:
      lowerCAmelCase_			:      List[Any]			=   self.full_loop()
      lowerCAmelCase_			:      Any			=   torch.mean(torch.abs(lowerCamelCase		)		)

      assert abs(result_mean.item() - 2_54_05_29		) < 10



