


from .imports import is_tqdm_available


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

from ..state import PartialState




def  a   (lowerCAmelCase__ = True		,				*lowerCAmelCase__		,				**lowerCAmelCase__   ):
   if not is_tqdm_available():
      raise ImportError("""Accelerate's `tqdm` module requires `tqdm` to be installed. Please run `pip install tqdm`."""   )
   __a					=  False
   if main_process_only:
      __a					=  PartialState().local_process_index == 0
   return _tqdm(*lowerCAmelCase__		,				**lowerCAmelCase__		,				disable=lowerCAmelCase__   )






def 						lowerCamelCase__      ( __A    :int	,__A    :float	,__A    :float		):


       """simple docstring"""




       return round(float(moles / volume		) * nfactor		)







def 						lowerCamelCase__      ( __A    :float	,__A    :float	,__A    :float		):


       """simple docstring"""




       return round(float((moles * 0.0_821 * temperature) / (volume)		)		)







def 						lowerCamelCase__      ( __A    :float	,__A    :float	,__A    :float		):


       """simple docstring"""




       return round(float((moles * 0.0_821 * temperature) / (pressure)		)		)







def 						lowerCamelCase__      ( __A    :float	,__A    :float	,__A    :float		):


       """simple docstring"""




       return round(float((pressure * volume) / (0.0_821 * moles)		)		)


if __name__ == "__main__":
    import doctest

    doctest.testmod()

