



from .imports import is_tqdm_available


if is_tqdm_available():
			from tqdm.auto import tqdm as _tqdm

from ..state import PartialState






def      __lowercase       (			a__ = True							,       *a__							,       **a__       )    ->			Dict:
							if not is_tqdm_available():
														raise ImportError('Accelerate\'s `tqdm` module requires `tqdm` to be installed. Please run `pip install tqdm`.'       )
							__SCREAMING_SNAKE_CASE									= False
							if main_process_only:
														__SCREAMING_SNAKE_CASE									= PartialState().local_process_index == 0
							return _tqdm(*a__							,       **a__							,       disable=a__       )











lowerCAmelCase__		:					Optional[int]							=9.80_665






def      __lowercase       (			a__							,       a__							,       a__ = g       )    ->			float:

							if fluid_density <= 0:
														raise ValueError('Impossible fluid density'       )
							if volume < 0:
														raise ValueError('Impossible Object volume'       )
							if gravity <= 0:
														raise ValueError('Impossible Gravity'       )

							return fluid_density * gravity * volume


if __name__ == "__main__":
			import doctest

			# run doctest
			doctest.testmod()






