
def 				a						(							snake_case__:					int | float | str					):


				'''simple docstring'''
				try:
								lowercase_       =					float(snake_case__					)
				except ValueError:
								raise ValueError('''Please enter a valid number'''					)
				lowercase_       =					decimal - int(snake_case__					)
				if fractional_part == 0:
								return int(snake_case__					), 1
				else:
								lowercase_       =					len(str(snake_case__					).split('''.'''					)[1]					)
								lowercase_       =					int(decimal * (10**number_of_frac_digits)					)
								lowercase_       =					10**number_of_frac_digits
								lowercase_  ,	lowercase_       =					denominator, numerator
								while True:
												lowercase_       =					dividend % divisor
												if remainder == 0:
																break
												lowercase_  ,	lowercase_       =					divisor, remainder
								lowercase_  ,	lowercase_       =					numerator / divisor, denominator / divisor
								return int(snake_case__					), int(snake_case__					)


if __name__ == "__main__":
						print(f"{decimal_to_fraction(2) = }")
						print(f"{decimal_to_fraction(89.0) = }")
						print(f"{decimal_to_fraction('67') = }")
						print(f"{decimal_to_fraction('45.0') = }")
						print(f"{decimal_to_fraction(1.5) = }")
						print(f"{decimal_to_fraction('6.25') = }")
						print(f"{decimal_to_fraction('78td') = }")






from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_sentencepiece_available,
    is_speech_available,
    is_torch_available,
)


__a  			=					{
    'configuration_trocr': ['TROCR_PRETRAINED_CONFIG_ARCHIVE_MAP', 'TrOCRConfig'],
    'processing_trocr': ['TrOCRProcessor'],
}


try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						__a  			=					[
						    'TROCR_PRETRAINED_MODEL_ARCHIVE_LIST',
						    'TrOCRForCausalLM',
						    'TrOCRPreTrainedModel',
						]


if TYPE_CHECKING:
						from .configuration_trocr import TROCR_PRETRAINED_CONFIG_ARCHIVE_MAP, TrOCRConfig
						from .processing_trocr import TrOCRProcessor

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_trocr import TROCR_PRETRAINED_MODEL_ARCHIVE_LIST, TrOCRForCausalLM, TrOCRPreTrainedModel

else:
						import sys

						__a  			=					_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)




