






def 					SCREAMING_SNAKE_CASE    (			snake_case_ :							str       ):
	snake_case__			:				int       =  hex_num.strip()
	if not hex_num:
		raise ValueError("No value was passed to the function"       )

	snake_case__			:				int       =  hex_num[0] == "-"
	if is_negative:
		snake_case__			:				Dict       =  hex_num[1:]

	try:
		snake_case__			:				Any       =  int(snake_case_					,  16       )
	except ValueError:
		raise ValueError("Invalid value was passed to the function"       )

	snake_case__			:				List[Any]       =  ""
	while int_num > 0:
		snake_case__			:				Optional[Any]       =  str(int_num % 2       ) + bin_str
		int_num >>= 1

	return int(("-" + bin_str) if is_negative else bin_str       )


if __name__ == "__main__":
	import doctest

	doctest.testmod()











from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


__lowerCamelCase :      Union[str, Any]										=				{
    """configuration_time_series_transformer""": [
        """TIME_SERIES_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """TimeSeriesTransformerConfig""",
    ],
}

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	__lowerCamelCase :      Tuple										=				[
	    """TIME_SERIES_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST""",
	    """TimeSeriesTransformerForPrediction""",
	    """TimeSeriesTransformerModel""",
	    """TimeSeriesTransformerPreTrainedModel""",
	]


if TYPE_CHECKING:
	from .configuration_time_series_transformer import (
	    TIME_SERIES_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
	    TimeSeriesTransformerConfig,
	)

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_time_series_transformer import (
		    TIME_SERIES_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
		    TimeSeriesTransformerForPrediction,
		    TimeSeriesTransformerModel,
		    TimeSeriesTransformerPreTrainedModel,
		)

else:
	import sys

	__lowerCamelCase :      Tuple										=				_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)



