





import inspect
import tempfile
from collections import OrderedDict, UserDict
from collections.abc import MutableMapping
from contextlib import ExitStack, contextmanager
from dataclasses import fields
from enum import Enum
from typing import Any, ContextManager, List, Tuple

import numpy as np

from .import_utils import is_flax_available, is_tf_available, is_torch_available, is_torch_fx_proxy


if is_flax_available():
       import jax.numpy as jnp

class       __A     (						_lowercase    ):


    def __get__(		self   , UpperCAmelCase_   , UpperCAmelCase_=None							):
        # See docs.python.org/3/howto/descriptor.html#properties
        if obj is None:
            return self
        if self.fget is None:
            raise AttributeError("""unreadable attribute"""							)
        lowerCamelCase	 ="""__cached_""" + self.fget.__name__
        lowerCamelCase	 =getattr(A_   , A_   , A_							)
        if cached is None:
            lowerCamelCase	 =self.fget(A_							)
            setattr(A_   , A_   , A_							)
        return cached





def      _lowercase					(						_UpperCAmelCase				)						->  Tuple:
    lowerCamelCase	 =val.lower()
    if val in {"y", "yes", "t", "true", "on", "1"}:
        return 1
    if val in {"n", "no", "f", "false", "off", "0"}:
        return 0
    raise ValueError(F"""invalid truth value {val!r}"""				)





def      _lowercase					(						_UpperCAmelCase				)						->  Any:
    if is_torch_fx_proxy(snake_case__				):
        return True
    if is_torch_available():
        import torch

        if isinstance(snake_case__			,      torch.Tensor				):
            return True
    if is_tf_available():
        import tensorflow as tf

        if isinstance(snake_case__			,      tf.Tensor				):
            return True

    if is_flax_available():
        import jax.numpy as jnp
        from jax.core import Tracer

        if isinstance(snake_case__			,      (jnp.ndarray, Tracer)				):
            return True

    return isinstance(snake_case__			,      np.ndarray				)





def      _lowercase					(						_UpperCAmelCase				)						->  Dict:
    return isinstance(snake_case__			,      np.ndarray				)





def      _lowercase					(						_UpperCAmelCase				)						->  Tuple:
    return _is_numpy(snake_case__				)





def      _lowercase					(						_UpperCAmelCase				)						->  List[Any]:
    import torch

    return isinstance(snake_case__			,      torch.Tensor				)





def      _lowercase					(						_UpperCAmelCase				)						->  Any:
    return False if not is_torch_available() else _is_torch(snake_case__				)





def      _lowercase					(						_UpperCAmelCase				)						->  Tuple:
    import torch

    return isinstance(snake_case__			,      torch.device				)





def      _lowercase					(						_UpperCAmelCase				)						->  int:
    return False if not is_torch_available() else _is_torch_device(snake_case__				)





def      _lowercase					(						_UpperCAmelCase				)						->  Tuple:
    import torch

    if isinstance(snake_case__			,      snake_case__				):
        if hasattr(snake_case__			,      snake_case__				):
            lowerCamelCase	 =getattr(snake_case__			,      snake_case__				)
        else:
            return False
    return isinstance(snake_case__			,      torch.dtype				)





def      _lowercase					(						_UpperCAmelCase				)						->  Tuple:
    return False if not is_torch_available() else _is_torch_dtype(snake_case__				)





def      _lowercase					(						_UpperCAmelCase				)						->  List[Any]:
    import tensorflow as tf

    return isinstance(snake_case__			,      tf.Tensor				)





def      _lowercase					(						_UpperCAmelCase				)						->  Any:
    return False if not is_tf_available() else _is_tensorflow(snake_case__				)





def      _lowercase					(						_UpperCAmelCase				)						->  Dict:
    import tensorflow as tf

    # the `is_symbolic_tensor` predicate is only available starting with TF 2.14
    if hasattr(snake_case__			,      """is_symbolic_tensor"""				):
        return tf.is_symbolic_tensor(snake_case__				)
    return type(snake_case__				) == tf.Tensor





def      _lowercase					(						_UpperCAmelCase				)						->  List[str]:
    return False if not is_tf_available() else _is_tf_symbolic_tensor(snake_case__				)





def      _lowercase					(						_UpperCAmelCase				)						->  Union[str, Any]:
    import jax.numpy as jnp  # noqa: F811

    return isinstance(snake_case__			,      jnp.ndarray				)





def      _lowercase					(						_UpperCAmelCase				)						->  Any:
    return False if not is_flax_available() else _is_jax(snake_case__				)





def      _lowercase					(						_UpperCAmelCase				)						->  Optional[int]:
    if isinstance(snake_case__			,      (dict, UserDict)				):
        return {k: to_py_obj(snake_case__				) for k, v in obj.items()}
    elif isinstance(snake_case__			,      (list, tuple)				):
        return [to_py_obj(snake_case__				) for o in obj]
    elif is_tf_tensor(snake_case__				):
        return obj.numpy().tolist()
    elif is_torch_tensor(snake_case__				):
        return obj.detach().cpu().tolist()
    elif is_jax_tensor(snake_case__				):
        return np.asarray(snake_case__				).tolist()
    elif isinstance(snake_case__			,      (np.ndarray, np.number)				):  # tolist also works on 0d np arrays
        return obj.tolist()
    else:
        return obj





def      _lowercase					(						_UpperCAmelCase				)						->  Dict:
    if isinstance(snake_case__			,      (dict, UserDict)				):
        return {k: to_numpy(snake_case__				) for k, v in obj.items()}
    elif isinstance(snake_case__			,      (list, tuple)				):
        return np.array(snake_case__				)
    elif is_tf_tensor(snake_case__				):
        return obj.numpy()
    elif is_torch_tensor(snake_case__				):
        return obj.detach().cpu().numpy()
    elif is_jax_tensor(snake_case__				):
        return np.asarray(snake_case__				)
    else:
        return obj

class       __A     (						_lowercase    ):


    def _snake_case       (		self							):
        lowerCamelCase	 =fields(self							)

        # Safety and consistency checks
        if not len(A_							):
            raise ValueError(f"""{self.__class__.__name__} has no fields."""							)
        if not all(field.default is None for field in class_fields[1:]							):
            raise ValueError(f"""{self.__class__.__name__} should not have more than one required field."""							)

        lowerCamelCase	 =getattr(self   , class_fields[0].name							)
        lowerCamelCase	 =all(getattr(self   , field.name							) is None for field in class_fields[1:]							)

        if other_fields_are_none and not is_tensor(A_							):
            if isinstance(A_   , A_							):
                lowerCamelCase	 =first_field.items()
                lowerCamelCase	 =True
            else:
                try:
                    lowerCamelCase	 =iter(A_							)
                    lowerCamelCase	 =True
                except TypeError:
                    lowerCamelCase	 =False

            # if we provided an iterator as first field and the iterator is a (key, value) iterator
            # set the associated fields
            if first_field_iterator:
                for idx, element in enumerate(A_							):
                    if (
                        not isinstance(A_   , (list, tuple)							)
                        or not len(A_							) == 2
                        or not isinstance(element[0]   , A_							)
                    ):
                        if idx == 0:
                            # If we do not have an iterator of key/values, set it as attribute
                            lowerCamelCase	 =first_field
                        else:
                            # If we have a mixed iterator, raise an error
                            raise ValueError(
                                f"""Cannot set key/value for {element}. It needs to be a tuple (key, value)."""							)
                        break
                    setattr(self   , element[0]   , element[1]							)
                    if element[1] is not None:
                        lowerCamelCase	 =element[1]
            elif first_field is not None:
                lowerCamelCase	 =first_field
        else:
            for field in class_fields:
                lowerCamelCase	 =getattr(self   , field.name							)
                if v is not None:
                    lowerCamelCase	 =v


    def __delitem__(		self   , *UpperCAmelCase_   , **UpperCAmelCase_							):
        raise Exception(f"""You cannot use ``__delitem__`` on a {self.__class__.__name__} instance."""							)


    def _snake_case       (		self   , *UpperCAmelCase_   , **UpperCAmelCase_							):
        raise Exception(f"""You cannot use ``setdefault`` on a {self.__class__.__name__} instance."""							)


    def _snake_case       (		self   , *UpperCAmelCase_   , **UpperCAmelCase_							):
        raise Exception(f"""You cannot use ``pop`` on a {self.__class__.__name__} instance."""							)


    def _snake_case       (		self   , *UpperCAmelCase_   , **UpperCAmelCase_							):
        raise Exception(f"""You cannot use ``update`` on a {self.__class__.__name__} instance."""							)


    def __getitem__(		self   , UpperCAmelCase_							):
        if isinstance(A_   , A_							):
            lowerCamelCase	 =dict(self.items()							)
            return inner_dict[k]
        else:
            return self.to_tuple()[k]


    def __setattr__(		self   , UpperCAmelCase_   , UpperCAmelCase_							):
        if name in self.keys() and value is not None:
            # Don't call self.__setitem__ to avoid recursion errors
            super().__setitem__(A_   , A_							)
        super().__setattr__(A_   , A_							)


    def __setitem__(		self   , UpperCAmelCase_   , UpperCAmelCase_							):
        # Will raise a KeyException if needed
        super().__setitem__(A_   , A_							)
        # Don't call self.__setattr__ to avoid recursion errors
        super().__setattr__(A_   , A_							)


    def _snake_case       (		self							):
        return tuple(self[k] for k in self.keys()							)




class       __A     (						_lowercase    ,					_lowercase    ):


    @classmethod
    def _snake_case       (		cls   , UpperCAmelCase_							):
        raise ValueError(
            f"""{value} is not a valid {cls.__name__}, please select one of {list(cls._valueamember_map_.keys()							)}"""							)




class       __A     (						_lowercase    ):
    __A      =				'''longest'''
    __A      =				'''max_length'''
    __A      =				'''do_not_pad'''




class       __A     (						_lowercase    ):
    __A      =				'''pt'''
    __A      =				'''tf'''
    __A      =				'''np'''
    __A      =				'''jax'''




class       __A     :


    def __init__(		self   , UpperCAmelCase_							):
        lowerCamelCase	 =context_managers
        lowerCamelCase	 =ExitStack()


    def __enter__(		self							):
        for context_manager in self.context_managers:
            self.stack.enter_context(A_							)


    def __exit__(		self   , *UpperCAmelCase_   , **UpperCAmelCase_							):
        self.stack.__exit__(*A_   , **A_							)





def      _lowercase					(						_UpperCAmelCase				)						->  int:
    lowerCamelCase	 =infer_framework(snake_case__				)
    if framework == "tf":
        lowerCamelCase	 =inspect.signature(model_class.call				)  # TensorFlow models
    elif framework == "pt":
        lowerCamelCase	 =inspect.signature(model_class.forward				)  # PyTorch models
    else:
        lowerCamelCase	 =inspect.signature(model_class.__call__				)  # Flax models

    for p in signature.parameters:
        if p == "return_loss" and signature.parameters[p].default is True:
            return True

    return False





def      _lowercase					(						_UpperCAmelCase				)						->  Any:
    lowerCamelCase	 =model_class.__name__
    lowerCamelCase	 =infer_framework(snake_case__				)
    if framework == "tf":
        lowerCamelCase	 =inspect.signature(model_class.call				)  # TensorFlow models
    elif framework == "pt":
        lowerCamelCase	 =inspect.signature(model_class.forward				)  # PyTorch models
    else:
        lowerCamelCase	 =inspect.signature(model_class.__call__				)  # Flax models

    if "QuestionAnswering" in model_name:
        return [p for p in signature.parameters if "label" in p or p in ("start_positions", "end_positions")]
    else:
        return [p for p in signature.parameters if "label" in p]





def      _lowercase					(						_UpperCAmelCase			,      _UpperCAmelCase = ""			,      _UpperCAmelCase = "."				)						->  List[Any]:

    def _flatten_dict(_UpperCAmelCase			,      _UpperCAmelCase=""			,      _UpperCAmelCase="."				):
        for k, v in d.items():
            lowerCamelCase	 =str(snake_case__				) + delimiter + str(snake_case__				) if parent_key else k
            if v and isinstance(snake_case__			,      snake_case__				):
                yield from flatten_dict(snake_case__			,      snake_case__			,      delimiter=snake_case__				).items()
            else:
                yield key, v

    return dict(_flatten_dict(snake_case__			,      snake_case__			,      snake_case__				)				)





@contextmanager
def      _lowercase					(						_UpperCAmelCase			,      _UpperCAmelCase = False				)						->  Tuple:
    if use_temp_dir:
        with tempfile.TemporaryDirectory() as tmp_dir:
            yield tmp_dir
    else:
        yield working_dir





def      _lowercase					(						_UpperCAmelCase			,      _UpperCAmelCase=None				)						->  Union[str, Any]:
    if is_numpy_array(snake_case__				):
        return np.transpose(snake_case__			,      axes=snake_case__				)
    elif is_torch_tensor(snake_case__				):
        return array.T if axes is None else array.permute(*snake_case__				)
    elif is_tf_tensor(snake_case__				):
        import tensorflow as tf

        return tf.transpose(snake_case__			,      perm=snake_case__				)
    elif is_jax_tensor(snake_case__				):
        return jnp.transpose(snake_case__			,      axes=snake_case__				)
    else:
        raise ValueError(F"""Type not supported for transpose: {type(snake_case__				)}."""				)





def      _lowercase					(						_UpperCAmelCase			,      _UpperCAmelCase				)						->  Optional[Any]:
    if is_numpy_array(snake_case__				):
        return np.reshape(snake_case__			,      snake_case__				)
    elif is_torch_tensor(snake_case__				):
        return array.reshape(*snake_case__				)
    elif is_tf_tensor(snake_case__				):
        import tensorflow as tf

        return tf.reshape(snake_case__			,      snake_case__				)
    elif is_jax_tensor(snake_case__				):
        return jnp.reshape(snake_case__			,      snake_case__				)
    else:
        raise ValueError(F"""Type not supported for reshape: {type(snake_case__				)}."""				)





def      _lowercase					(						_UpperCAmelCase			,      _UpperCAmelCase=None				)						->  List[str]:
    if is_numpy_array(snake_case__				):
        return np.squeeze(snake_case__			,      axis=snake_case__				)
    elif is_torch_tensor(snake_case__				):
        return array.squeeze() if axis is None else array.squeeze(dim=snake_case__				)
    elif is_tf_tensor(snake_case__				):
        import tensorflow as tf

        return tf.squeeze(snake_case__			,      axis=snake_case__				)
    elif is_jax_tensor(snake_case__				):
        return jnp.squeeze(snake_case__			,      axis=snake_case__				)
    else:
        raise ValueError(F"""Type not supported for squeeze: {type(snake_case__				)}."""				)





def      _lowercase					(						_UpperCAmelCase			,      _UpperCAmelCase				)						->  Optional[int]:
    if is_numpy_array(snake_case__				):
        return np.expand_dims(snake_case__			,      snake_case__				)
    elif is_torch_tensor(snake_case__				):
        return array.unsqueeze(dim=snake_case__				)
    elif is_tf_tensor(snake_case__				):
        import tensorflow as tf

        return tf.expand_dims(snake_case__			,      axis=snake_case__				)
    elif is_jax_tensor(snake_case__				):
        return jnp.expand_dims(snake_case__			,      axis=snake_case__				)
    else:
        raise ValueError(F"""Type not supported for expand_dims: {type(snake_case__				)}."""				)





def      _lowercase					(						_UpperCAmelCase				)						->  Optional[int]:
    if is_numpy_array(snake_case__				):
        return np.size(snake_case__				)
    elif is_torch_tensor(snake_case__				):
        return array.numel()
    elif is_tf_tensor(snake_case__				):
        import tensorflow as tf

        return tf.size(snake_case__				)
    elif is_jax_tensor(snake_case__				):
        return array.size
    else:
        raise ValueError(F"""Type not supported for expand_dims: {type(snake_case__				)}."""				)





def      _lowercase					(						_UpperCAmelCase			,      _UpperCAmelCase				)						->  Tuple:
    for key, value in auto_map.items():
        if isinstance(snake_case__			,      (tuple, list)				):
            lowerCamelCase	 =[F"""{repo_id}--{v}""" if (v is not None and """--""" not in v) else v for v in value]
        elif value is not None and "--" not in value:
            lowerCamelCase	 =F"""{repo_id}--{value}"""

    return auto_map





def      _lowercase					(						_UpperCAmelCase				)						->  str:
    for base_class in inspect.getmro(snake_case__				):
        lowerCamelCase	 =base_class.__module__
        lowerCamelCase	 =base_class.__name__
        if module.startswith("""tensorflow"""				) or module.startswith("""keras"""				) or name == "TFPreTrainedModel":
            return "tf"
        elif module.startswith("""torch"""				) or name == "PreTrainedModel":
            return "pt"
        elif module.startswith("""flax"""				) or module.startswith("""jax"""				) or name == "FlaxPreTrainedModel":
            return "flax"
    else:
        raise TypeError(F"""Could not infer framework from class {model_class}."""				)












from __future__ import annotations

UpperCAmelCase__						:			str									=tuple[int, int, int]
UpperCAmelCase__						:			str									=tuple[str, str, str]


# used alphabet --------------------------
# from string.ascii_uppercase
UpperCAmelCase__						:			int									='''ABCDEFGHIJKLMNOPQRSTUVWXYZ'''

# -------------------------- default selection --------------------------
# rotors --------------------------
UpperCAmelCase__						:			Union[str, Any]									='''EGZWVONAHDCLFQMSIPJBYUKXTR'''
UpperCAmelCase__						:			Union[str, Any]									='''FOBHMDKEXQNRAULPGSJVTYICZW'''
UpperCAmelCase__						:			Union[str, Any]									='''ZJXESIUQLHAVRMDOYGTNFWPBKC'''
# reflector --------------------------
UpperCAmelCase__						:			Optional[Any]									={
    '''A''': '''N''',
    '''N''': '''A''',
    '''B''': '''O''',
    '''O''': '''B''',
    '''C''': '''P''',
    '''P''': '''C''',
    '''D''': '''Q''',
    '''Q''': '''D''',
    '''E''': '''R''',
    '''R''': '''E''',
    '''F''': '''S''',
    '''S''': '''F''',
    '''G''': '''T''',
    '''T''': '''G''',
    '''H''': '''U''',
    '''U''': '''H''',
    '''I''': '''V''',
    '''V''': '''I''',
    '''J''': '''W''',
    '''W''': '''J''',
    '''K''': '''X''',
    '''X''': '''K''',
    '''L''': '''Y''',
    '''Y''': '''L''',
    '''M''': '''Z''',
    '''Z''': '''M''',
}

# -------------------------- extra rotors --------------------------
UpperCAmelCase__						:			Dict									='''RMDJXFUWGISLHVTCQNKYPBEZOA'''
UpperCAmelCase__						:			Any									='''SGLCPQWZHKXAREONTFBVIYJUDM'''
UpperCAmelCase__						:			List[Any]									='''HVSICLTYKQUBXDWAJZOMFGPREN'''
UpperCAmelCase__						:			Tuple									='''RZWQHFMVDBKICJLNTUXAGYPSOE'''
UpperCAmelCase__						:			Optional[Any]									='''LFKIJODBEGAMQPXVUHYSTCZRWN'''
UpperCAmelCase__						:			Dict									='''KOAEGVDHXPQZMLFTYWJNBRCIUS'''





def      _lowercase					(						_UpperCAmelCase			,      _UpperCAmelCase			,      _UpperCAmelCase				)						->  tuple[RotorPositionT, RotorSelectionT, dict[str, str]]:
				# Checks if there are 3 unique rotors

				if (unique_rotsel := len(set(_UpperCAmelCase				)				)) < 3:
								lowerCamelCase	 =F"""Please use 3 unique rotors (not {unique_rotsel})"""
								raise Exception(_UpperCAmelCase				)

				# Checks if rotor positions are valid
				lowerCamelCase ,  lowerCamelCase ,  lowerCamelCase	 =rotpos
				if not 0 < rotorposa <= len(_UpperCAmelCase				):
								lowerCamelCase	 =F"""First rotor position is not within range of 1..26 ({rotorposa}"""
								raise ValueError(_UpperCAmelCase				)
				if not 0 < rotorposa <= len(_UpperCAmelCase				):
								lowerCamelCase	 =F"""Second rotor position is not within range of 1..26 ({rotorposa})"""
								raise ValueError(_UpperCAmelCase				)
				if not 0 < rotorposa <= len(_UpperCAmelCase				):
								lowerCamelCase	 =F"""Third rotor position is not within range of 1..26 ({rotorposa})"""
								raise ValueError(_UpperCAmelCase				)

				# Validates string and returns dict
				lowerCamelCase	 =_plugboard(_UpperCAmelCase				)

				return rotpos, rotsel, pbdict





def      _lowercase					(						_UpperCAmelCase				)						->  dict[str, str]:

				# tests the input string if it
				# a) is type string
				# b) has even length (so pairs can be made)
				if not isinstance(_UpperCAmelCase			,      _UpperCAmelCase				):
								lowerCamelCase	 =F"""Plugboard setting isn't type string ({type(_UpperCAmelCase				)})"""
								raise TypeError(_UpperCAmelCase				)
				elif len(_UpperCAmelCase				) % 2 != 0:
								lowerCamelCase	 =F"""Odd number of symbols ({len(_UpperCAmelCase				)})"""
								raise Exception(_UpperCAmelCase				)
				elif pbstring == "":
								return {}

				pbstring.replace(""" """			,      """"""				)

				# Checks if all characters are unique
				lowerCamelCase	 =set()
				for i in pbstring:
								if i not in abc:
												lowerCamelCase	 =F"""'{i}' not in list of symbols"""
												raise Exception(_UpperCAmelCase				)
								elif i in tmppbl:
												lowerCamelCase	 =F"""Duplicate symbol ({i})"""
												raise Exception(_UpperCAmelCase				)
								else:
												tmppbl.add(_UpperCAmelCase				)
				del tmppbl

				# Created the dictionary
				lowerCamelCase	 ={}
				for j in range(0			,      len(_UpperCAmelCase				) - 1			,      2				):
								lowerCamelCase	 =pbstring[j + 1]
								lowerCamelCase	 =pbstring[j]

				return pb





def      _lowercase					(						_UpperCAmelCase			,      _UpperCAmelCase			,      _UpperCAmelCase = (rotora, rotora, rotora)			,      _UpperCAmelCase = ""			,      )						->  str:
				lowerCamelCase	 =text.upper()
				lowerCamelCase ,  lowerCamelCase ,  lowerCamelCase	 =_validator(
				    _UpperCAmelCase			,      _UpperCAmelCase			,      plugb.upper()				)

				lowerCamelCase ,  lowerCamelCase ,  lowerCamelCase	 =rotor_position
				lowerCamelCase ,  lowerCamelCase ,  lowerCamelCase	 =rotor_selection
				rotorposa -= 1
				rotorposa -= 1
				rotorposa -= 1

				lowerCamelCase	 =[]

				# encryption/decryption process --------------------------
				for symbol in text:
								if symbol in abc:
												# 1st plugboard --------------------------
												if symbol in plugboard:
																lowerCamelCase	 =plugboard[symbol]

												# rotor ra --------------------------
												lowerCamelCase	 =abc.index(_UpperCAmelCase				) + rotorposa
												lowerCamelCase	 =rotora[index % len(_UpperCAmelCase				)]

												# rotor rb --------------------------
												lowerCamelCase	 =abc.index(_UpperCAmelCase				) + rotorposa
												lowerCamelCase	 =rotora[index % len(_UpperCAmelCase				)]

												# rotor rc --------------------------
												lowerCamelCase	 =abc.index(_UpperCAmelCase				) + rotorposa
												lowerCamelCase	 =rotora[index % len(_UpperCAmelCase				)]

												# reflector --------------------------
												# this is the reason you don't need another machine to decipher

												lowerCamelCase	 =reflector[symbol]

												# 2nd rotors
												lowerCamelCase	 =abc[rotora.index(_UpperCAmelCase				) - rotorposa]
												lowerCamelCase	 =abc[rotora.index(_UpperCAmelCase				) - rotorposa]
												lowerCamelCase	 =abc[rotora.index(_UpperCAmelCase				) - rotorposa]

												# 2nd plugboard
												if symbol in plugboard:
																lowerCamelCase	 =plugboard[symbol]

												# moves/resets rotor positions
												rotorposa += 1
												if rotorposa >= len(_UpperCAmelCase				):
																lowerCamelCase	 =0
																rotorposa += 1
												if rotorposa >= len(_UpperCAmelCase				):
																lowerCamelCase	 =0
																rotorposa += 1
												if rotorposa >= len(_UpperCAmelCase				):
																lowerCamelCase	 =0

        # else:
        #    pass
        #    Error could be also raised
        #    raise ValueError(
        #       'Invalid symbol('+repr(symbol)+')')
								result.append(_UpperCAmelCase				)

				return "".join(_UpperCAmelCase				)


if __name__ == "__main__":
							UpperCAmelCase__						:			Union[str, Any]									='''This is my Python script that emulates the Enigma machine from WWII.'''
							UpperCAmelCase__						:			List[Any]									=(1, 1, 1)
							UpperCAmelCase__						:			Optional[Any]									='''pictures'''
							UpperCAmelCase__						:			Any									=(rotora, rotora, rotora)
							UpperCAmelCase__						:			str									=enigma(message, rotor_pos, rotor_sel, pb)

							print('''Encrypted message:''', en)
							print('''Decrypted message:''', enigma(en, rotor_pos, rotor_sel, pb))





