




def     _SCREAMING_SNAKE_CASE    (							lowercase			: str			,							lowercase			: int  ):


      '''simple docstring'''



      lowerCamelCase_	  =					[[] for _ in range(lowercase  )]
      lowerCamelCase_	  =					key - 1

      if key <= 0:
            raise ValueError('Height of grid can\'t be 0 or negative'  )
      if key == 1 or len(lowercase  ) <= key:
            return input_string

      for position, character in enumerate(lowercase  ):
            lowerCamelCase_	  =					position % (lowest * 2)  # puts it in bounds
            lowerCamelCase_	  =					min(lowercase			,							lowest * 2 - num  )  # creates zigzag pattern
            temp_grid[num].append(lowercase  )
      lowerCamelCase_	  =					[''.join(lowercase  ) for row in temp_grid]
      lowerCamelCase_	  =					''.join(lowercase  )

      return output_string

def     _SCREAMING_SNAKE_CASE    (							lowercase			: str			,							lowercase			: int  ):


      '''simple docstring'''



      lowerCamelCase_	  =					[]
      lowerCamelCase_	  =					key - 1

      if key <= 0:
            raise ValueError('Height of grid can\'t be 0 or negative'  )
      if key == 1:
            return input_string

      lowerCamelCase_	  =					[[] for _ in range(lowercase  )]  # generates template
      for position in range(len(lowercase  )  ):
            lowerCamelCase_	  =					position % (lowest * 2)  # puts it in bounds
            lowerCamelCase_	  =					min(lowercase			,							lowest * 2 - num  )  # creates zigzag pattern
            temp_grid[num].append('*'  )

      lowerCamelCase_	  =					0
      for row in temp_grid:  # fills in the characters
            lowerCamelCase_	  =					input_string[counter : counter + len(lowercase  )]
            grid.append(list(lowercase  )  )
            counter += len(lowercase  )

      lowerCamelCase_	  =					''  # reads as zigzag
      for position in range(len(lowercase  )  ):
            lowerCamelCase_	  =					position % (lowest * 2)  # puts it in bounds
            lowerCamelCase_	  =					min(lowercase			,							lowest * 2 - num  )  # creates zigzag pattern
            output_string += grid[num][0]
            grid[num].pop(0  )
      return output_string

def     _SCREAMING_SNAKE_CASE    (							lowercase			: str  ):


      '''simple docstring'''



      lowerCamelCase_	  =					{}
      for key_guess in range(1			,							len(lowercase  )  ):  # tries every key
            lowerCamelCase_	  =					decrypt(lowercase			,							lowercase  )
      return results


if __name__ == "__main__":
 import doctest

 doctest.testmod()









from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_tf_available,
    is_torch_available,
    is_vision_available,
)


lowerCamelCase       :	Dict									=     {"configuration_vit": ["VIT_PRETRAINED_CONFIG_ARCHIVE_MAP", "ViTConfig", "ViTOnnxConfig"]}

try:
 if not is_vision_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 lowerCamelCase       :	Optional[int]									=     ["ViTFeatureExtractor"]
 lowerCamelCase       :	Dict									=     ["ViTImageProcessor"]

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 lowerCamelCase       :	int									=     [
     "VIT_PRETRAINED_MODEL_ARCHIVE_LIST",
     "ViTForImageClassification",
     "ViTForMaskedImageModeling",
     "ViTModel",
     "ViTPreTrainedModel",
 ]

try:
 if not is_tf_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 lowerCamelCase       :	Tuple									=     [
     "TFViTForImageClassification",
     "TFViTModel",
     "TFViTPreTrainedModel",
 ]

try:
 if not is_flax_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 lowerCamelCase       :	Dict									=     [
     "FlaxViTForImageClassification",
     "FlaxViTModel",
     "FlaxViTPreTrainedModel",
 ]

if TYPE_CHECKING:
 from .configuration_vit import VIT_PRETRAINED_CONFIG_ARCHIVE_MAP, ViTConfig, ViTOnnxConfig

 try:
  if not is_vision_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .feature_extraction_vit import ViTFeatureExtractor
  from .image_processing_vit import ViTImageProcessor

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_vit import (
      VIT_PRETRAINED_MODEL_ARCHIVE_LIST,
      ViTForImageClassification,
      ViTForMaskedImageModeling,
      ViTModel,
      ViTPreTrainedModel,
  )

 try:
  if not is_tf_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_tf_vit import TFViTForImageClassification, TFViTModel, TFViTPreTrainedModel

 try:
  if not is_flax_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_flax_vit import FlaxViTForImageClassification, FlaxViTModel, FlaxViTPreTrainedModel


else:
 import sys

 lowerCamelCase       :	Any									=     _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)



