





import copy
import fnmatch
import json
import os
import pickle as pkl
import shutil
import sys
import tarfile
import tempfile
from collections import OrderedDict
from contextlib import contextmanager
from functools import partial
from hashlib import shaaaa
from io import BytesIO
from pathlib import Path
from urllib.parse import urlparse
from zipfile import ZipFile, is_zipfile

import cva
import numpy as np
import requests
import wget
from filelock import FileLock
from PIL import Image
from tqdm.auto import tqdm
from yaml import Loader, dump, load


try:
					import torch

					UpperCamelCase__											= True
except ImportError:
					UpperCamelCase__											= False


try:
					from torch.hub import _get_torch_home

					UpperCamelCase__											= _get_torch_home()
except ImportError:
					UpperCamelCase__											= os.path.expanduser(
					    os.getenv("TORCH_HOME", os.path.join(os.getenv("XDG_CACHE_HOME", "~/.cache"), "torch"))
					)

UpperCamelCase__											= os.path.join(torch_cache_home, "transformers")

UpperCamelCase__											= "https://cdn.huggingface.co"
UpperCamelCase__											= "https://s3.amazonaws.com/models.huggingface.co/bert"
UpperCamelCase__											= "/".join(str(Path(__file__).resolve()).split("/")[:-1])
UpperCamelCase__											= os.path.join(PATH, "config.yaml")
UpperCamelCase__											= os.path.join(PATH, "attributes.txt")
UpperCamelCase__											= os.path.join(PATH, "objects.txt")
UpperCamelCase__											= os.getenv("PYTORCH_PRETRAINED_BERT_CACHE", default_cache_path)
UpperCamelCase__											= os.getenv("PYTORCH_TRANSFORMERS_CACHE", PYTORCH_PRETRAINED_BERT_CACHE)
UpperCamelCase__											= os.getenv("TRANSFORMERS_CACHE", PYTORCH_TRANSFORMERS_CACHE)
UpperCamelCase__											= "pytorch_model.bin"
UpperCamelCase__											= "config.yaml"





def     _UpperCamelCase     (a__   :str=OBJECTS   ,			a__   :Optional[Any]=ATTRIBUTES       ):






							"""simple docstring"""





							UpperCamelCase__				     =			[]
							with open(a__       ) as f:
														for object in f.readlines():
																					vg_classes.append(object.split(""","""       )[0].lower().strip()       )

							UpperCamelCase__				     =			[]
							with open(a__       ) as f:
														for object in f.readlines():
																					vg_attrs.append(object.split(""","""       )[0].lower().strip()       )
							return vg_classes, vg_attrs





def     _UpperCamelCase     (a__   :Union[str, Any]       ):






							"""simple docstring"""





							UpperCamelCase__				     =			OrderedDict()
							with open(a__   ,			"""rb"""       ) as f:
														UpperCamelCase__				     =			pkl.load(a__       )["""model"""]
							for k in copy.deepcopy(list(ckp.keys()       )       ):
														UpperCamelCase__				     =			ckp.pop(a__       )
														if isinstance(a__   ,			np.ndarray       ):
																					UpperCamelCase__				     =			torch.tensor(a__       )
														else:
																					assert isinstance(a__   ,			torch.tensor       ), type(a__       )
														UpperCamelCase__				     =			v
							return r

class        __SCREAMING_SNAKE_CASE					:
							snake_case     :      Union[str, Any]						     =       {}






							def __init__(						self  , __lowerCAmelCase  , __lowerCAmelCase = "root"  , __lowerCAmelCase=0  ):
														UpperCamelCase__				     =			name
														UpperCamelCase__				     =			level
														UpperCamelCase__				     =			{}
														for k, v in dictionary.items():
																					if v is None:
																												raise ValueError()
																					UpperCamelCase__				     =			copy.deepcopy(__lowerCAmelCase  )
																					UpperCamelCase__				     =			copy.deepcopy(__lowerCAmelCase  )
																					if isinstance(__lowerCAmelCase  , __lowerCAmelCase  ):
																												UpperCamelCase__				     =			Config(__lowerCAmelCase  , name=__lowerCAmelCase  , level=level + 1  )
																					UpperCamelCase__				     =			v
																					setattr(self  , __lowerCAmelCase  , __lowerCAmelCase  )

														UpperCamelCase__				     =			d






							def __repr__(						self  ):
														return str(list((self._pointer.keys())  )  )






							def __setattr__(						self  , __lowerCAmelCase  , __lowerCAmelCase  ):
														UpperCamelCase__				     =			val
														UpperCamelCase__				     =			val
														UpperCamelCase__				     =			key.split("""."""  )
														UpperCamelCase__				     =			len(__lowerCAmelCase  ) - 1
														UpperCamelCase__				     =			self._pointer
														if len(__lowerCAmelCase  ) > 1:
																					for i, l in enumerate(__lowerCAmelCase  ):
																												if hasattr(self  , __lowerCAmelCase  ) and isinstance(getattr(self  , __lowerCAmelCase  )  , __lowerCAmelCase  ):
																																			setattr(getattr(self  , __lowerCAmelCase  )  , """.""".join(levels[i:]  )  , __lowerCAmelCase  )
																												if l == last_level:
																																			UpperCamelCase__				     =			val
																												else:
																																			UpperCamelCase__				     =			pointer[l]






							def 				_lowerCamelCase		(						self  ):
														return self._pointer






							def 				_lowerCamelCase		(						self  , __lowerCAmelCase  , __lowerCAmelCase  ):
														with open(f"""{file_name}"""  , """w"""  ) as stream:
																					dump(__lowerCAmelCase  , __lowerCAmelCase  )






							def 				_lowerCamelCase		(						self  , __lowerCAmelCase  , __lowerCAmelCase  ):
														with open(f"""{file_name}"""  , """w"""  ) as stream:
																					json.dump(__lowerCAmelCase  , __lowerCAmelCase  )






							@staticmethod
							def 				_lowerCamelCase		(						__lowerCAmelCase  ):
														with open(__lowerCAmelCase  ) as stream:
																					UpperCamelCase__				     =			load(__lowerCAmelCase  , Loader=__lowerCAmelCase  )
														return data






							def __str__(						self  ):
														UpperCamelCase__				     =			"""    """
														if self._name != "root":
																					UpperCamelCase__				     =			f"""{t * (self._level-1)}{self._name}:\n"""
														else:
																					UpperCamelCase__				     =			""""""
														UpperCamelCase__				     =			self._level
														for i, (k, v) in enumerate(self._pointer.items()  ):
																					if isinstance(__lowerCAmelCase  , __lowerCAmelCase  ):
																												r += f"""{t * (self._level)}{v}\n"""
																												self._level += 1
																					else:
																												r += f"""{t * (self._level)}{k}: {v} ({type(__lowerCAmelCase  ).__name__})\n"""
																					UpperCamelCase__				     =			level
														return r[:-1]






							@classmethod
							def 				_lowerCamelCase		(						cls  , __lowerCAmelCase  , **__lowerCAmelCase  ):
														UpperCamelCase__     ,     UpperCamelCase__				     =			cls.get_config_dict(__lowerCAmelCase  , **__lowerCAmelCase  )
														return cls(__lowerCAmelCase  )







							@classmethod
							def 				_lowerCamelCase		(						cls  , __lowerCAmelCase  , **__lowerCAmelCase  ):
														UpperCamelCase__				     =			kwargs.pop("""cache_dir"""  , __lowerCAmelCase  )
														UpperCamelCase__				     =			kwargs.pop("""force_download"""  , __lowerCAmelCase  )
														UpperCamelCase__				     =			kwargs.pop("""resume_download"""  , __lowerCAmelCase  )
														UpperCamelCase__				     =			kwargs.pop("""proxies"""  , __lowerCAmelCase  )
														UpperCamelCase__				     =			kwargs.pop("""local_files_only"""  , __lowerCAmelCase  )

														if os.path.isdir(__lowerCAmelCase  ):
																					UpperCamelCase__				     =			os.path.join(__lowerCAmelCase  , __lowerCAmelCase  )
														elif os.path.isfile(__lowerCAmelCase  ) or is_remote_url(__lowerCAmelCase  ):
																					UpperCamelCase__				     =			pretrained_model_name_or_path
														else:
																					UpperCamelCase__				     =			hf_bucket_url(__lowerCAmelCase  , filename=__lowerCAmelCase  , use_cdn=__lowerCAmelCase  )

														try:
																					# Load from URL or cache if already cached
																					UpperCamelCase__				     =			cached_path(
																					    __lowerCAmelCase  , cache_dir=__lowerCAmelCase  , force_download=__lowerCAmelCase  , proxies=__lowerCAmelCase  , resume_download=__lowerCAmelCase  , local_files_only=__lowerCAmelCase  , )
																					# Load config dict
																					if resolved_config_file is None:
																												raise EnvironmentError

																					UpperCamelCase__				     =			Config.load_yaml(__lowerCAmelCase  )

														except EnvironmentError:
																					UpperCamelCase__				     =			"""Can't load config for"""
																					raise EnvironmentError(__lowerCAmelCase  )

														if resolved_config_file == config_file:
																					print("""loading configuration file from path"""  )
														else:
																					print("""loading configuration file cache"""  )

														return Config.load_yaml(__lowerCAmelCase  ), kwargs






def     _UpperCamelCase     (a__   :Any       ):






							"""simple docstring"""





							UpperCamelCase__				     =			torch.load("""dump.pt"""   ,			map_location=in_tensor.device       )
							UpperCamelCase__				     =			in_tensor.numpy()
							UpperCamelCase__				     =			out_tensor.numpy()[0]
							print(na.shape   ,			na[0, 0, :5]       )
							print(na.shape   ,			na[0, 0, :5]       )
							assert np.allclose(a__   ,			a__   ,			rtol=0.01   ,			atol=0.1       ), (
							    f"""{sum([1 for x in np.isclose(a__   ,			a__   ,			rtol=0.01   ,			atol=0.1       ).flatten() if x is False]       )/len(na.flatten()       )*100:.4f} %"""
							    " element-wise mismatch"
							)
							raise Exception("""tensors are all good"""       )

							# Hugging face functions below





def     _UpperCamelCase     (a__   :int       ):






							"""simple docstring"""





							UpperCamelCase__				     =			urlparse(a__       )
							return parsed.scheme in ("http", "https")





def     _UpperCamelCase     (a__   :str   ,			a__   :str   ,			a__   :Any=True       ):






							"""simple docstring"""





							UpperCamelCase__				     =			CLOUDFRONT_DISTRIB_PREFIX if use_cdn else S3_BUCKET_PREFIX
							UpperCamelCase__				     =			"""/""" not in model_id
							if legacy_format:
														return f"""{endpoint}/{model_id}-{filename}"""
							else:
														return f"""{endpoint}/{model_id}/{filename}"""





def     _UpperCamelCase     (a__   :Dict   ,			a__   :Tuple   ,			a__   :List[str]=None   ,			a__   :Dict=0   ,			a__   :Tuple=None   ,			):






							"""simple docstring"""





							UpperCamelCase__				     =			"""python/{}""".format(sys.version.split()[0]       )
							if _torch_available:
														ua += "; torch/{}".format(torch.__version__       )
							if isinstance(a__   ,			a__       ):
														ua += "; " + "; ".join("""{}/{}""".format(a__   ,			a__       ) for k, v in user_agent.items()       )
							elif isinstance(a__   ,			a__       ):
														ua += "; " + user_agent
							UpperCamelCase__				     =			{"""user-agent""": ua}
							if resume_size > 0:
														UpperCamelCase__				     =			"""bytes=%d-""" % (resume_size,)
							UpperCamelCase__				     =			requests.get(a__   ,			stream=a__   ,			proxies=a__   ,			headers=a__       )
							if response.status_code == 416:  # Range not satisfiable
														return
							UpperCamelCase__				     =			response.headers.get("""Content-Length"""       )
							UpperCamelCase__				     =			resume_size + int(a__       ) if content_length is not None else None
							UpperCamelCase__				     =			tqdm(
							    unit="""B"""   ,			unit_scale=a__   ,			total=a__   ,			initial=a__   ,			desc="""Downloading"""   ,			)
							for chunk in response.iter_content(chunk_size=1024       ):
														if chunk:  # filter out keep-alive new chunks
																					progress.update(len(a__       )       )
																					temp_file.write(a__       )
							progress.close()





def     _UpperCamelCase     (a__   :List[str]   ,			a__   :Tuple=None   ,			a__   :Tuple=False   ,			a__   :str=None   ,			a__   :Optional[int]=10   ,			a__   :Optional[int]=False   ,			a__   :Union[str, Any]=None   ,			a__   :Union[str, Any]=False   ,			):






							"""simple docstring"""





							if cache_dir is None:
														UpperCamelCase__				     =			TRANSFORMERS_CACHE
							if isinstance(a__   ,			a__       ):
														UpperCamelCase__				     =			str(a__       )

							os.makedirs(a__   ,			exist_ok=a__       )

							UpperCamelCase__				     =			None
							if not local_files_only:
														try:
																					UpperCamelCase__				     =			requests.head(a__   ,			allow_redirects=a__   ,			proxies=a__   ,			timeout=a__       )
																					if response.status_code == 200:
																												UpperCamelCase__				     =			response.headers.get("""ETag"""       )
														except (EnvironmentError, requests.exceptions.Timeout):
																					# etag is already None
																					pass

							UpperCamelCase__				     =			url_to_filename(a__   ,			a__       )

							# get cache path to put the file
							UpperCamelCase__				     =			os.path.join(a__   ,			a__       )

							# etag is None = we don't have a connection, or url doesn't exist, or is otherwise inaccessible.
							# try to get the last downloaded one
							if etag is None:
														if os.path.exists(a__       ):
																					return cache_path
														else:
																					UpperCamelCase__				     =			[
																					    file
																					    for file in fnmatch.filter(os.listdir(a__       )   ,			filename + """.*"""       )
																					    if not file.endswith(""".json"""       ) and not file.endswith(""".lock"""       )
																					]
																					if len(a__       ) > 0:
																												return os.path.join(a__   ,			matching_files[-1]       )
																					else:
																												# If files cannot be found and local_files_only=True,
																												# the models might've been found if local_files_only=False
																												# Notify the user about that
																												if local_files_only:
																																			raise ValueError(
																																			    """Cannot find the requested files in the cached path and outgoing traffic has been"""
																																			    """ disabled. To enable model look-ups and downloads online, set 'local_files_only'"""
																																			    """ to False."""       )
																												return None

    # From now on, etag is not None.
							if os.path.exists(a__       ) and not force_download:
														return cache_path

							# Prevent parallel downloads of the same file with a lock.
							UpperCamelCase__				     =			cache_path + """.lock"""
							with FileLock(a__       ):
														# If the download just completed while the lock was activated.
														if os.path.exists(a__       ) and not force_download:
																					# Even if returning early like here, the lock will be released.
																					return cache_path

														if resume_download:
																					UpperCamelCase__				     =			cache_path + """.incomplete"""

																					@contextmanager
																					def _resumable_file_manager():
																												with open(a__   ,			"""a+b"""       ) as f:
																																			yield f

																					UpperCamelCase__				     =			_resumable_file_manager
																					if os.path.exists(a__       ):
																												UpperCamelCase__				     =			os.stat(a__       ).st_size
																					else:
																												UpperCamelCase__				     =			0
														else:
																					UpperCamelCase__				     =			partial(tempfile.NamedTemporaryFile   ,			dir=a__   ,			delete=a__       )
																					UpperCamelCase__				     =			0

														# Download to temporary file, then copy to cache dir once finished.
														# Otherwise you get corrupt cache entries if the download gets interrupted.
														with temp_file_manager() as temp_file:
																					print(
																					    """%s not found in cache or force_download set to True, downloading to %s"""   ,			a__   ,			temp_file.name   ,			)

																					http_get(
																					    a__   ,			a__   ,			proxies=a__   ,			resume_size=a__   ,			user_agent=a__   ,			)

														os.replace(temp_file.name   ,			a__       )

														UpperCamelCase__				     =			{"""url""": url, """etag""": etag}
														UpperCamelCase__				     =			cache_path + """.json"""
														with open(a__   ,			"""w"""       ) as meta_file:
																					json.dump(a__   ,			a__       )

							return cache_path





def     _UpperCamelCase     (a__   :Tuple   ,			a__   :Union[str, Any]=None       ):






							"""simple docstring"""





							UpperCamelCase__				     =			url.encode("""utf-8"""       )
							UpperCamelCase__				     =			shaaaa(a__       )
							UpperCamelCase__				     =			url_hash.hexdigest()

							if etag:
														UpperCamelCase__				     =			etag.encode("""utf-8"""       )
														UpperCamelCase__				     =			shaaaa(a__       )
														filename += "." + etag_hash.hexdigest()

							if url.endswith(""".h5"""       ):
														filename += ".h5"

							return filename





def     _UpperCamelCase     (a__   :int   ,			a__   :Dict=None   ,			a__   :int=False   ,			a__   :Dict=None   ,			a__   :Optional[Any]=False   ,			a__   :List[str]=None   ,			a__   :Union[str, Any]=False   ,			a__   :int=False   ,			a__   :Optional[int]=False   ,			):






							"""simple docstring"""





							if cache_dir is None:
														UpperCamelCase__				     =			TRANSFORMERS_CACHE
							if isinstance(a__   ,			a__       ):
														UpperCamelCase__				     =			str(a__       )
							if isinstance(a__   ,			a__       ):
														UpperCamelCase__				     =			str(a__       )

							if is_remote_url(a__       ):
														# URL, so get it from the cache (downloading if necessary)
														UpperCamelCase__				     =			get_from_cache(
														    a__   ,			cache_dir=a__   ,			force_download=a__   ,			proxies=a__   ,			resume_download=a__   ,			user_agent=a__   ,			local_files_only=a__   ,			)
							elif os.path.exists(a__       ):
														# File, and it exists.
														UpperCamelCase__				     =			url_or_filename
							elif urlparse(a__       ).scheme == "":
														# File, but it doesn't exist.
														raise EnvironmentError("""file {} not found""".format(a__       )       )
							else:
														# Something unknown
														raise ValueError("""unable to parse {} as a URL or as a local path""".format(a__       )       )

							if extract_compressed_file:
														if not is_zipfile(a__       ) and not tarfile.is_tarfile(a__       ):
																					return output_path

														# Path where we extract compressed archives
														# We avoid '.' in dir name and add "-extracted" at the end: "./model.zip" => "./model-zip-extracted/"
														UpperCamelCase__     ,     UpperCamelCase__				     =			os.path.split(a__       )
														UpperCamelCase__				     =			output_file.replace("""."""   ,			"""-"""       ) + """-extracted"""
														UpperCamelCase__				     =			os.path.join(a__   ,			a__       )

														if os.path.isdir(a__       ) and os.listdir(a__       ) and not force_extract:
																					return output_path_extracted

														# Prevent parallel extractions
														UpperCamelCase__				     =			output_path + """.lock"""
														with FileLock(a__       ):
																					shutil.rmtree(a__   ,			ignore_errors=a__       )
																					os.makedirs(a__       )
																					if is_zipfile(a__       ):
																												with ZipFile(a__   ,			"""r"""       ) as zip_file:
																																			zip_file.extractall(a__       )
																																			zip_file.close()
																					elif tarfile.is_tarfile(a__       ):
																												UpperCamelCase__				     =			tarfile.open(a__       )
																												tar_file.extractall(a__       )
																												tar_file.close()
																					else:
																												raise EnvironmentError("""Archive format of {} could not be identified""".format(a__       )       )

														return output_path_extracted

							return output_path





def     _UpperCamelCase     (a__   :Optional[int]   ,			a__   :Optional[int]=","       ):






							"""simple docstring"""





							assert isinstance(a__   ,			a__       )
							if os.path.isfile(a__       ):
														with open(a__       ) as f:
																					UpperCamelCase__				     =			eval(f.read()       )
							else:
														UpperCamelCase__				     =			requests.get(a__       )
														try:
																					UpperCamelCase__				     =			requests.json()
														except Exception:
																					UpperCamelCase__				     =			req.content.decode()
																					assert data is not None, "could not connect"
																					try:
																												UpperCamelCase__				     =			eval(a__       )
																					except Exception:
																												UpperCamelCase__				     =			data.split("""\n"""       )
														req.close()
							return data





def     _UpperCamelCase     (a__   :str       ):






							"""simple docstring"""





							UpperCamelCase__				     =			requests.get(a__       )
							UpperCamelCase__				     =			np.array(Image.open(BytesIO(response.content       )       )       )
							return img





def     _UpperCamelCase     (a__   :str       ):






							"""simple docstring"""





							UpperCamelCase__				     =			url.split("""/"""       )[-1]
							if fn not in os.listdir(os.getcwd()       ):
														wget.download(a__       )
							with open(a__   ,			"""rb"""       ) as stream:
														UpperCamelCase__				     =			pkl.load(a__       )
							UpperCamelCase__				     =			weights.pop("""model"""       )
							UpperCamelCase__				     =			{}
							for k, v in model.items():
														UpperCamelCase__				     =			torch.from_numpy(a__       )
														if "running_var" in k:
																					UpperCamelCase__				     =			torch.tensor([0]       )
																					UpperCamelCase__				     =			k.replace("""running_var"""   ,			"""num_batches_tracked"""       )
																					UpperCamelCase__				     =			zero
							return new





def     _UpperCamelCase     ():






							"""simple docstring"""





							print(f"""{os.path.abspath(os.path.join(a__   ,			os.pardir       )       )}/demo.ipynb"""       )





def     _UpperCamelCase     (a__   :Optional[Any]   ,			a__   :List[str]="RGB"       ):






							"""simple docstring"""





							assert isinstance(a__   ,			a__       )
							if os.path.isfile(a__       ):
														UpperCamelCase__				     =			cva.imread(a__       )
							else:
														UpperCamelCase__				     =			get_image_from_url(a__       )
														assert img is not None, f"""could not connect to: {im}"""
							UpperCamelCase__				     =			cva.cvtColor(a__   ,			cva.COLOR_BGR2RGB       )
							if input_format == "RGB":
														UpperCamelCase__				     =			img[:, :, ::-1]
							return img





def     _UpperCamelCase     (a__   :Tuple   ,			a__   :Optional[Any]=1       ):






							"""simple docstring"""





							return (images[i : i + batch] for i in range(0   ,			len(a__       )   ,			a__       ))











import argparse
import datetime





def     _UpperCamelCase     (a__   :str       ):






							"""simple docstring"""





							UpperCamelCase__				     =			{
							    """0""": """Sunday""",
							    """1""": """Monday""",
							    """2""": """Tuesday""",
							    """3""": """Wednesday""",
							    """4""": """Thursday""",
							    """5""": """Friday""",
							    """6""": """Saturday""",
							}

							UpperCamelCase__				     =			{0: 1, 1: 2, 2: 3, 3: 4, 4: 5, 5: 6, 6: 0}

							# Validate
							if not 0 < len(a__       ) < 11:
														raise ValueError("""Must be 10 characters long"""       )

							# Get month
							UpperCamelCase__				     =			int(date_input[0] + date_input[1]       )
							# Validate
							if not 0 < m < 13:
														raise ValueError("""Month must be between 1 - 12"""       )

							UpperCamelCase__				     =			date_input[2]
							# Validate
							if sep_a not in ["-", "/"]:
														raise ValueError("""Date separator must be '-' or '/'"""       )

							# Get day
							UpperCamelCase__				     =			int(date_input[3] + date_input[4]       )
							# Validate
							if not 0 < d < 32:
														raise ValueError("""Date must be between 1 - 31"""       )

							# Get second separator
							UpperCamelCase__				     =			date_input[5]
							# Validate
							if sep_a not in ["-", "/"]:
														raise ValueError("""Date separator must be '-' or '/'"""       )

							# Get year
							UpperCamelCase__				     =			int(date_input[6] + date_input[7] + date_input[8] + date_input[9]       )
							# Arbitrary year range
							if not 45 < y < 8500:
														raise ValueError(
														    """Year out of range. There has to be some sort of limit...right?"""       )

							# Get datetime obj for validation
							UpperCamelCase__				     =			datetime.date(int(a__       )   ,			int(a__       )   ,			int(a__       )       )

							# Start math
							if m <= 2:
														UpperCamelCase__				     =			y - 1
														UpperCamelCase__				     =			m + 12
							# maths var
							UpperCamelCase__				     =			int(str(a__       )[:2]       )
							UpperCamelCase__				     =			int(str(a__       )[2:]       )
							UpperCamelCase__				     =			int(2.6 * m - 5.39       )
							UpperCamelCase__				     =			int(c / 4       )
							UpperCamelCase__				     =			int(k / 4       )
							UpperCamelCase__				     =			int(d + k       )
							UpperCamelCase__				     =			int(t + u + v + x       )
							UpperCamelCase__				     =			int(z - (2 * c)       )
							UpperCamelCase__				     =			round(w % 7       )
							# End math

							# Validate math
							if f != convert_datetime_days[dt_ck.weekday()]:
														raise AssertionError("""The date was evaluated incorrectly. Contact developer."""       )

							# Response
							UpperCamelCase__				     =			f"""Your date {date_input}, is a {days[str(a__       )]}!"""
							return response


if __name__ == "__main__":
					import doctest

					doctest.testmod()
					UpperCamelCase__											= argparse.ArgumentParser(
					    description=(
					        "Find out what day of the week nearly any date is or was. Enter "
					        "date as a string in the mm-dd-yyyy or mm/dd/yyyy format"
					    )
					)
					parser.add_argument(
					    "date_input", type=str, help="Date as a string (mm-dd-yyyy or mm/dd/yyyy)"
					)
					UpperCamelCase__											= parser.parse_args()
					zeller(args.date_input)




