

'''simple docstring'''
from ...utils import (
    OptionalDependencyNotAvailable,
    is_torch_available,
    is_transformers_available,
    is_transformers_version,
)


try:
    if not (is_transformers_available() and is_torch_available()):
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    from ...utils.dummy_torch_and_transformers_objects import ShapEPipeline
else:
    from .camera import create_pan_cameras
    from .pipeline_shap_e import ShapEPipeline
    from .pipeline_shap_e_img2img import ShapEImgaImgPipeline
    from .renderer import (
        BoundingBoxVolume,
        ImportanceRaySampler,
        MLPNeRFModelOutput,
        MLPNeRSTFModel,
        ShapEParamsProjModel,
        ShapERenderer,
        StratifiedRaySampler,
        VoidNeRFModel,
    )









'''simple docstring'''
from timeit import timeit







def  _A		(     snake_case					)      ->     int:
   if number < 0:
      raise ValueError("the value of input must not be negative"					)
   _lowercase      :				Union[str, Any]      					=       0
   while number:
      number &= number - 1
      result += 1
   return result







def  _A		(     snake_case					)      ->     int:
   if number < 0:
      raise ValueError("the value of input must not be negative"					)
   _lowercase      :				int      					=       0
   while number:
      if number % 2 == 1:
         result += 1
      number >>= 1
   return result







def  _A		(     )      ->     None:

   def do_benchmark(snake_case					) -> None:
      _lowercase      :				Optional[int]      					=       "import __main__ as z"
      print(F'''Benchmark when {number = }:'''					)
      print(F'''{get_set_bits_count_using_modulo_operator(snake_case					) = }'''					)
      _lowercase      :				int      					=       timeit("z.get_set_bits_count_using_modulo_operator(25)"		,							setup=snake_case					)
      print(F'''timeit() runs in {timing} seconds'''					)
      print(F'''{get_set_bits_count_using_brian_kernighans_algorithm(snake_case					) = }'''					)
      _lowercase      :				Optional[int]      					=       timeit(
          "z.get_set_bits_count_using_brian_kernighans_algorithm(25)"		,							setup=snake_case		,							)
      print(F'''timeit() runs in {timing} seconds'''					)

   for number in (25, 37, 58, 0):
      do_benchmark(snake_case					)
      print()


if __name__ == "__main__":
    import doctest

    doctest.testmod()
    benchmark()






