



'''simple docstring'''






import collections
import inspect
import unittest
from typing import Dict, List, Tuple

from transformers import MaskFormerSwinConfig
from transformers.testing_utils import require_torch, require_torch_multi_gpu, torch_device
from transformers.utils import is_torch_available

from ...test_backbone_common import BackboneTesterMixin
from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin, floats_tensor, ids_tensor
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
     import torch
     from torch import nn

     from transformers import MaskFormerSwinBackbone
     from transformers.models.maskformer import MaskFormerSwinModel

class 							a__:







    def __init__(   self				:						Optional[int]		,    __snake_case				:						List[Any]		,    __snake_case				:						List[Any]=13		,    __snake_case				:						Any=32		,    __snake_case				:						Optional[Any]=2		,    __snake_case				:						Any=3		,    __snake_case				:						Dict=16		,    __snake_case				:						str=[1, 2, 1]		,    __snake_case				:						Optional[Any]=[2, 2, 4]		,    __snake_case				:						Union[str, Any]=2		,    __snake_case				:						List[Any]=2.0		,    __snake_case				:						Union[str, Any]=True		,    __snake_case				:						Optional[Any]=0.0		,    __snake_case				:						Union[str, Any]=0.0		,    __snake_case				:						Union[str, Any]=0.1		,    __snake_case				:						Dict="gelu"		,    __snake_case				:						Union[str, Any]=False		,    __snake_case				:						List[str]=True		,    __snake_case				:						List[Any]=0.02		,    __snake_case				:						List[str]=1e-5		,    __snake_case				:						Tuple=True		,    __snake_case				:						Dict=None		,    __snake_case				:						Optional[Any]=True		,    __snake_case				:						Optional[int]=10		,    __snake_case				:						str=8		,    __snake_case				:						int=["stage1", "stage2", "stage3"]		,    __snake_case				:						Tuple=[1, 2, 3]		,    ):
      a		:      Union[str, Any]       =  parent
      a		:      Tuple       =  batch_size
      a		:      int       =  image_size
      a		:      str       =  patch_size
      a		:      List[str]       =  num_channels
      a		:      str       =  embed_dim
      a		:      Optional[int]       =  depths
      a		:      str       =  num_heads
      a		:      Union[str, Any]       =  window_size
      a		:      Union[str, Any]       =  mlp_ratio
      a		:      Union[str, Any]       =  qkv_bias
      a		:      Union[str, Any]       =  hidden_dropout_prob
      a		:      Any       =  attention_probs_dropout_prob
      a		:      int       =  drop_path_rate
      a		:      List[str]       =  hidden_act
      a		:      int       =  use_absolute_embeddings
      a		:      Any       =  patch_norm
      a		:      List[Any]       =  layer_norm_eps
      a		:      Optional[int]       =  initializer_range
      a		:      str       =  is_training
      a		:      Optional[int]       =  scope
      a		:      List[Any]       =  use_labels
      a		:      Union[str, Any]       =  type_sequence_label_size
      a		:      Optional[Any]       =  encoder_stride
      a		:      Optional[int]       =  out_features
      a		:      Tuple       =  out_indices







    def     lowercase_ (   self				:						Any			):
      a		:      Dict       =  floats_tensor([self.batch_size, self.num_channels, self.image_size, self.image_size]			)

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

      a		:      Union[str, Any]       =  self.get_config()

      return config, pixel_values, labels







    def     lowercase_ (   self				:						int			):
      return MaskFormerSwinConfig(
          image_size=self.image_size		,    patch_size=self.patch_size		,    num_channels=self.num_channels		,    embed_dim=self.embed_dim		,    depths=self.depths		,    num_heads=self.num_heads		,    window_size=self.window_size		,    mlp_ratio=self.mlp_ratio		,    qkv_bias=self.qkv_bias		,    hidden_dropout_prob=self.hidden_dropout_prob		,    attention_probs_dropout_prob=self.attention_probs_dropout_prob		,    drop_path_rate=self.drop_path_rate		,    hidden_act=self.hidden_act		,    use_absolute_embeddings=self.use_absolute_embeddings		,    path_norm=self.patch_norm		,    layer_norm_eps=self.layer_norm_eps		,    initializer_range=self.initializer_range		,    encoder_stride=self.encoder_stride		,    out_features=self.out_features		,    out_indices=self.out_indices		,    )







    def     lowercase_ (   self				:						Tuple		,    __snake_case				:						List[str]		,    __snake_case				:						Optional[Any]		,    __snake_case				:						Optional[Any]			):
      a		:      int       =  MaskFormerSwinModel(config=__snake_case			)
      model.to(__snake_case			)
      model.eval()
      a		:      Optional[Any]       =  model(__snake_case			)

      a		:      int       =  ((config.image_size // config.patch_size) ** 2) // (4 ** (len(config.depths			) - 1))
      a		:      Union[str, Any]       =  int(config.embed_dim * 2 ** (len(config.depths			) - 1)			)

      self.parent.assertEqual(result.last_hidden_state.shape		,    (self.batch_size, expected_seq_len, expected_dim)			)







    def     lowercase_ (   self				:						List[Any]		,    __snake_case				:						int		,    __snake_case				:						Dict		,    __snake_case				:						List[Any]			):
      a		:      Dict       =  MaskFormerSwinBackbone(config=__snake_case			)
      model.to(__snake_case			)
      model.eval()
      a		:      int       =  model(__snake_case			)

      # verify feature maps
      self.parent.assertEqual(len(result.feature_maps			)		,    len(config.out_features			)			)
      self.parent.assertListEqual(list(result.feature_maps[0].shape			)		,    [13, 16, 16, 16]			)

      # verify channels
      self.parent.assertEqual(len(model.channels			)		,    len(config.out_features			)			)
      self.parent.assertListEqual(model.channels		,    [16, 32, 64]			)

      # verify ValueError
      with self.parent.assertRaises(__snake_case			):
        a		:      str       =  ['stem']
        a		:      str       =  MaskFormerSwinBackbone(config=__snake_case			)







    def     lowercase_ (   self				:						int			):
      a		:      Optional[int]       =  self.prepare_config_and_inputs()
      a     ,			a     ,			a		:      str       =  config_and_inputs
      a		:      Union[str, Any]       =  {'pixel_values': pixel_values}
      return config, inputs_dict

@require_torch
class 							a__(      lowerCamelCase__	,				lowerCamelCase__	,				unittest.TestCase			):
    lowercase__				=					(
        (
            MaskFormerSwinModel,
            MaskFormerSwinBackbone,
        )
        if is_torch_available()
        else ()
    )
    lowercase__				=					{"""feature-extraction""": MaskFormerSwinModel} if is_torch_available() else {}
    lowercase__				=					False
    lowercase__				=					False
    lowercase__				=					False
    lowercase__				=					False
    lowercase__				=					False







    def     lowercase_ (   self				:						int			):
      a		:      Optional[Any]       =  MaskFormerSwinModelTester(self			)
      a		:      int       =  ConfigTester(self		,    config_class=__snake_case		,    embed_dim=37			)







    @require_torch_multi_gpu
    @unittest.skip(
        reason=(
            '`MaskFormerSwinModel` outputs `hidden_states_spatial_dimensions` which doesn\'t work well with'
            ' `nn.DataParallel`'
        )			)
    def     lowercase_ (   self				:						Union[str, Any]			):
      pass







    def     lowercase_ (   self				:						Union[str, Any]			):
      self.create_and_test_config_common_properties()
      self.config_tester.create_and_test_config_to_json_string()
      self.config_tester.create_and_test_config_to_json_file()
      self.config_tester.create_and_test_config_from_and_save_pretrained()
      self.config_tester.create_and_test_config_with_num_labels()
      self.config_tester.check_config_can_be_init_without_params()
      self.config_tester.check_config_arguments_init()







    def     lowercase_ (   self				:						Union[str, Any]			):
      return







    def     lowercase_ (   self				:						Any			):
      a		:      Dict       =  self.model_tester.prepare_config_and_inputs()
      self.model_tester.create_and_check_model(*__snake_case			)







    def     lowercase_ (   self				:						Any			):
      a		:      List[Any]       =  self.model_tester.prepare_config_and_inputs()
      self.model_tester.create_and_check_backbone(*__snake_case			)







    @unittest.skip('Swin does not use inputs_embeds'			)
    def     lowercase_ (   self				:						str			):
      pass







    @unittest.skip('Swin does not support feedforward chunking'			)
    def     lowercase_ (   self				:						List[Any]			):
      pass







    def     lowercase_ (   self				:						int			):
      a     ,			a		:      List[Any]       =  self.model_tester.prepare_config_and_inputs_for_common()

      for model_class in self.all_model_classes:
        a		:      Tuple       =  model_class(__snake_case			)
        self.assertIsInstance(model.get_input_embeddings()		,    (nn.Module)			)
        a		:      List[str]       =  model.get_output_embeddings()
        self.assertTrue(x is None or isinstance(__snake_case		,    nn.Linear			)			)







    def     lowercase_ (   self				:						Union[str, Any]			):
      a     ,			a		:      Union[str, Any]       =  self.model_tester.prepare_config_and_inputs_for_common()

      for model_class in self.all_model_classes:
        a		:      str       =  model_class(__snake_case			)
        a		:      str       =  inspect.signature(model.forward			)
        # signature.parameters is an OrderedDict => so arg_names order is deterministic
        a		:      str       =  [*signature.parameters.keys()]

        a		:      Dict       =  ['pixel_values']
        self.assertListEqual(arg_names[:1]		,    __snake_case			)







    @unittest.skip(reason='MaskFormerSwin is only used as backbone and doesn\'t support output_attentions'			)
    def     lowercase_ (   self				:						Union[str, Any]			):
      pass







    @unittest.skip(reason='MaskFormerSwin is only used as an internal backbone'			)
    def     lowercase_ (   self				:						Tuple			):
      pass







    def     lowercase_ (   self				:						Tuple		,    __snake_case				:						Tuple		,    __snake_case				:						str		,    __snake_case				:						Any		,    __snake_case				:						str			):
      a		:      str       =  model_class(__snake_case			)
      model.to(__snake_case			)
      model.eval()

      with torch.no_grad():
        a		:      Optional[int]       =  model(**self._prepare_for_class(__snake_case		,    __snake_case			)			)

      a		:      Tuple       =  outputs.hidden_states

      a		:      Optional[int]       =  getattr(
          self.model_tester		,    'expected_num_hidden_layers'		,    len(self.model_tester.depths			) + 1			)
      self.assertEqual(len(__snake_case			)		,    __snake_case			)

      # Swin has a different seq_length
      a		:      int       =  (
          config.patch_size
          if isinstance(config.patch_size		,    collections.abc.Iterable			)
          else (config.patch_size, config.patch_size)
      )

      a		:      List[str]       =  (image_size[1] // patch_size[1]) * (image_size[0] // patch_size[0])

      self.assertListEqual(
          list(hidden_states[0].shape[-2:]			)		,    [num_patches, self.model_tester.embed_dim]		,    )







    def     lowercase_ (   self				:						str			):
      a     ,			a		:      str       =  self.model_tester.prepare_config_and_inputs_for_common()

      a		:      Union[str, Any]       =  (
          self.model_tester.image_size
          if isinstance(self.model_tester.image_size		,    collections.abc.Iterable			)
          else (self.model_tester.image_size, self.model_tester.image_size)
      )

      for model_class in self.all_model_classes:
        a		:      int       =  True
        self.check_hidden_states_output(__snake_case		,    __snake_case		,    __snake_case		,    __snake_case			)

        # check that output_hidden_states also work using config
        del inputs_dict["output_hidden_states"]
        a		:      Optional[Any]       =  True

        self.check_hidden_states_output(__snake_case		,    __snake_case		,    __snake_case		,    __snake_case			)







    def     lowercase_ (   self				:						List[str]			):
      a     ,			a		:      str       =  self.model_tester.prepare_config_and_inputs_for_common()
      a		:      int       =  3

      a		:      List[Any]       =  (
          self.model_tester.image_size
          if isinstance(self.model_tester.image_size		,    collections.abc.Iterable			)
          else (self.model_tester.image_size, self.model_tester.image_size)
      )
      a		:      int       =  (
          config.patch_size
          if isinstance(config.patch_size		,    collections.abc.Iterable			)
          else (config.patch_size, config.patch_size)
      )

      a		:      Optional[int]       =  image_size[0] + patch_size[0] - (image_size[0] % patch_size[0])
      a		:      Optional[int]       =  image_size[1] + patch_size[1] - (image_size[1] % patch_size[1])

      for model_class in self.all_model_classes:
        a		:      Dict       =  True
        self.check_hidden_states_output(__snake_case		,    __snake_case		,    __snake_case		,    (padded_height, padded_width)			)

        # check that output_hidden_states also work using config
        del inputs_dict["output_hidden_states"]
        a		:      List[str]       =  True
        self.check_hidden_states_output(__snake_case		,    __snake_case		,    __snake_case		,    (padded_height, padded_width)			)







    @unittest.skip(reason='MaskFormerSwin doesn\'t have pretrained checkpoints'			)
    def     lowercase_ (   self				:						Dict			):
      pass







    @unittest.skip(reason='This will be fixed once MaskFormerSwin is replaced by native Swin'			)
    def     lowercase_ (   self				:						Any			):
      pass







    @unittest.skip(reason='This will be fixed once MaskFormerSwin is replaced by native Swin'			)
    def     lowercase_ (   self				:						str			):
      pass







    def     lowercase_ (   self				:						Union[str, Any]			):
      a     ,			a		:      Dict       =  self.model_tester.prepare_config_and_inputs_for_common()

      def set_nan_tensor_to_zero(__snake_case				:						List[Any]			):
        a		:      int       =  0
        return t

      def check_equivalence(__snake_case				:						Tuple		,    __snake_case				:						int		,    __snake_case				:						Optional[int]		,    __snake_case				:						List[Any]={}			):
        with torch.no_grad():
          a		:      Optional[int]       =  model(**__snake_case		,    return_dict=__snake_case		,    **__snake_case			)
          a		:      Any       =  model(**__snake_case		,    return_dict=__snake_case		,    **__snake_case			).to_tuple()

          def recursive_check(__snake_case				:						Dict		,    __snake_case				:						int			):
            if isinstance(__snake_case		,    (List, Tuple)			):
              for tuple_iterable_value, dict_iterable_value in zip(__snake_case		,    __snake_case			):
                recursive_check(__snake_case		,    __snake_case			)
            elif isinstance(__snake_case		,    __snake_case			):
              for tuple_iterable_value, dict_iterable_value in zip(
                  tuple_object.values()		,    dict_object.values()			):
                recursive_check(__snake_case		,    __snake_case			)
            elif tuple_object is None:
              return
            else:
              self.assertTrue(
                  torch.allclose(
                      set_nan_tensor_to_zero(__snake_case			)		,    set_nan_tensor_to_zero(__snake_case			)		,    atol=1e-5			)		,    msg=(
                      'Tuple and dict output are not equal. Difference:'
                      F""" {torch.max(torch.abs(tuple_object - dict_object			)			)}. Tuple has `nan`:"""
                      F""" {torch.isnan(__snake_case			).any()} and `inf`: {torch.isinf(__snake_case			)}. Dict has"""
                      F""" `nan`: {torch.isnan(__snake_case			).any()} and `inf`: {torch.isinf(__snake_case			)}."""
                  )		,    )

          recursive_check(__snake_case		,    __snake_case			)

      for model_class in self.all_model_classes:
        a		:      Tuple       =  model_class(__snake_case			)
        model.to(__snake_case			)
        model.eval()

        a		:      List[Any]       =  self._prepare_for_class(__snake_case		,    __snake_case			)
        a		:      int       =  self._prepare_for_class(__snake_case		,    __snake_case			)
        check_equivalence(__snake_case		,    __snake_case		,    __snake_case			)

        a		:      List[str]       =  self._prepare_for_class(__snake_case		,    __snake_case		,    return_labels=__snake_case			)
        a		:      int       =  self._prepare_for_class(__snake_case		,    __snake_case		,    return_labels=__snake_case			)
        check_equivalence(__snake_case		,    __snake_case		,    __snake_case			)

        a		:      List[str]       =  self._prepare_for_class(__snake_case		,    __snake_case			)
        a		:      Dict       =  self._prepare_for_class(__snake_case		,    __snake_case			)
        check_equivalence(__snake_case		,    __snake_case		,    __snake_case		,    {'output_hidden_states': True}			)

        a		:      Tuple       =  self._prepare_for_class(__snake_case		,    __snake_case		,    return_labels=__snake_case			)
        a		:      Dict       =  self._prepare_for_class(__snake_case		,    __snake_case		,    return_labels=__snake_case			)
        check_equivalence(__snake_case		,    __snake_case		,    __snake_case		,    {'output_hidden_states': True}			)

@require_torch
class 							a__(      unittest.TestCase	,				lowerCamelCase__			):
    lowercase__				=					(MaskFormerSwinBackbone,) if is_torch_available() else ()
    lowercase__				=					MaskFormerSwinConfig







    def     lowercase_ (   self				:						str			):
      a		:      int       =  MaskFormerSwinModelTester(self			)







    def     lowercase_ (   self				:						List[Any]			):
      a     ,			a		:      Dict       =  self.model_tester.prepare_config_and_inputs_for_common()
      a		:      List[str]       =  inputs_dict['pixel_values'].shape[0]

      for backbone_class in self.all_model_classes:
        a		:      Union[str, Any]       =  backbone_class(__snake_case			)
        backbone.to(__snake_case			)
        backbone.eval()

        a		:      Dict       =  backbone(**__snake_case			)

        # Test default outputs and verify feature maps
        self.assertIsInstance(outputs.feature_maps		,    __snake_case			)
        self.assertTrue(len(outputs.feature_maps			) == len(backbone.channels			)			)
        for feature_map, n_channels in zip(outputs.feature_maps		,    backbone.channels			):
          self.assertTrue(feature_map.shape[:2]		,    (batch_size, n_channels)			)
        self.assertIsNone(outputs.hidden_states			)
        self.assertIsNone(outputs.attentions			)

        # Test output_hidden_states=True
        a		:      Dict       =  backbone(**__snake_case		,    output_hidden_states=__snake_case			)
        self.assertIsNotNone(outputs.hidden_states			)
        self.assertTrue(len(outputs.hidden_states			)		,    len(backbone.stage_names			)			)
        # We skip the stem layer
        for hidden_states, n_channels in zip(outputs.hidden_states[1:]		,    backbone.channels			):
          for hidden_state in hidden_states:
            # Hidden states are in the format (batch_size, (height * width), n_channels)
            a     ,			a     ,			a		:      Union[str, Any]       =  hidden_state.shape
            self.assertTrue((h_batch_size, h_n_channels)		,    (batch_size, n_channels)			)

            # Test output_attentions=True
        if self.has_attentions:
          a		:      Optional[int]       =  backbone(**__snake_case		,    output_attentions=__snake_case			)
          self.assertIsNotNone(outputs.attentions			)




'''simple docstring'''






import unittest

import numpy as np

from transformers import BertConfig, is_flax_available
from transformers.testing_utils import require_flax, slow

from ...test_modeling_flax_common import FlaxModelTesterMixin, floats_tensor, ids_tensor, random_attention_mask


if is_flax_available():
     from transformers.models.bert.modeling_flax_bert import (
         FlaxBertForMaskedLM,
         FlaxBertForMultipleChoice,
         FlaxBertForNextSentencePrediction,
         FlaxBertForPreTraining,
         FlaxBertForQuestionAnswering,
         FlaxBertForSequenceClassification,
         FlaxBertForTokenClassification,
         FlaxBertModel,
     )

class 							a__(      unittest.TestCase			):







    def __init__(   self				:						Dict		,    __snake_case				:						Union[str, Any]		,    __snake_case				:						Any=13		,    __snake_case				:						Any=7		,    __snake_case				:						int=True		,    __snake_case				:						List[Any]=True		,    __snake_case				:						int=True		,    __snake_case				:						List[Any]=True		,    __snake_case				:						Optional[Any]=99		,    __snake_case				:						List[str]=32		,    __snake_case				:						List[Any]=5		,    __snake_case				:						int=4		,    __snake_case				:						List[str]=37		,    __snake_case				:						int="gelu"		,    __snake_case				:						Tuple=0.1		,    __snake_case				:						Union[str, Any]=0.1		,    __snake_case				:						Any=5_12		,    __snake_case				:						Tuple=16		,    __snake_case				:						Union[str, Any]=2		,    __snake_case				:						str=0.02		,    __snake_case				:						Union[str, Any]=4		,    ):
      a		:      List[Any]       =  parent
      a		:      List[str]       =  batch_size
      a		:      Dict       =  seq_length
      a		:      str       =  is_training
      a		:      Optional[int]       =  use_attention_mask
      a		:      Union[str, Any]       =  use_token_type_ids
      a		:      List[str]       =  use_labels
      a		:      Dict       =  vocab_size
      a		:      Tuple       =  hidden_size
      a		:      Optional[Any]       =  num_hidden_layers
      a		:      List[str]       =  num_attention_heads
      a		:      Tuple       =  intermediate_size
      a		:      Dict       =  hidden_act
      a		:      List[str]       =  hidden_dropout_prob
      a		:      str       =  attention_probs_dropout_prob
      a		:      str       =  max_position_embeddings
      a		:      Tuple       =  type_vocab_size
      a		:      Optional[Any]       =  type_sequence_label_size
      a		:      Union[str, Any]       =  initializer_range
      a		:      Union[str, Any]       =  num_choices







    def     lowercase_ (   self				:						Any			):
      a		:      List[Any]       =  ids_tensor([self.batch_size, self.seq_length]		,    self.vocab_size			)

      a		:      List[str]       =  None
      if self.use_attention_mask:
        a		:      List[Any]       =  random_attention_mask([self.batch_size, self.seq_length]			)

      a		:      Dict       =  None
      if self.use_token_type_ids:
        a		:      List[str]       =  ids_tensor([self.batch_size, self.seq_length]		,    self.type_vocab_size			)

      a		:      Dict       =  BertConfig(
          vocab_size=self.vocab_size		,    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		,    max_position_embeddings=self.max_position_embeddings		,    type_vocab_size=self.type_vocab_size		,    is_decoder=__snake_case		,    initializer_range=self.initializer_range		,    )

      return config, input_ids, token_type_ids, attention_mask







    def     lowercase_ (   self				:						Tuple			):
      a		:      Optional[int]       =  self.prepare_config_and_inputs()
      a     ,			a     ,			a     ,			a		:      Union[str, Any]       =  config_and_inputs
      a		:      str       =  {'input_ids': input_ids, 'token_type_ids': token_type_ids, 'attention_mask': attention_mask}
      return config, inputs_dict







    def     lowercase_ (   self				:						List[str]			):
      a		:      int       =  self.prepare_config_and_inputs()
      a     ,			a     ,			a     ,			a		:      Tuple       =  config_and_inputs

      a		:      int       =  True
      a		:      int       =  floats_tensor([self.batch_size, self.seq_length, self.hidden_size]			)
      a		:      Optional[Any]       =  ids_tensor([self.batch_size, self.seq_length]		,    vocab_size=2			)

      return (
          config,
          input_ids,
          attention_mask,
          encoder_hidden_states,
          encoder_attention_mask,
      )

@require_flax
class 							a__(      lowerCamelCase__	,				unittest.TestCase			):
    lowercase__				=					True

    lowercase__				=					(
        (
            FlaxBertModel,
            FlaxBertForPreTraining,
            FlaxBertForMaskedLM,
            FlaxBertForMultipleChoice,
            FlaxBertForQuestionAnswering,
            FlaxBertForNextSentencePrediction,
            FlaxBertForSequenceClassification,
            FlaxBertForTokenClassification,
            FlaxBertForQuestionAnswering,
        )
        if is_flax_available()
        else ()
    )







    def     lowercase_ (   self				:						Union[str, Any]			):
      a		:      str       =  FlaxBertModelTester(self			)







    @slow
    def     lowercase_ (   self				:						Any			):
      # Only check this for base model, not necessary for all model classes.
      # This will also help speed-up tests.
      a		:      Optional[Any]       =  FlaxBertModel.from_pretrained('bert-base-cased'			)
      a		:      Union[str, Any]       =  model(np.ones((1, 1)			)			)
      self.assertIsNotNone(__snake_case			)