






"""simple docstring"""





import inspect
import unittest


class      _lowercase (     unittest.TestCase						):


      def _UpperCamelCase						(    self				:	int						):





            """simple docstring"""







            try:
                  import diffusers  # noqa: F401
            except ImportError:
                  assert False







      def _UpperCamelCase						(    self				:	Union[str, Any]						):





            """simple docstring"""







            import diffusers
            from diffusers.dependency_versions_table import deps

            __snake_case      :    Any  			=inspect.getmembers(a							,   inspect.isclass						)

            for cls_name, cls_module in all_classes:
                  if "dummy_" in cls_module.__module__:
                        for backend in cls_module._backends:
                              if backend == "k_diffusion":
                                    __snake_case      :    List[Any]  			='''k-diffusion'''
                              elif backend == "invisible_watermark":
                                    __snake_case      :    int  			='''invisible-watermark'''
                              assert backend in deps, f'''{backend} is not in the deps table!'''










"""simple docstring"""





from __future__ import annotations



def     __lowercase					(    a :				int       ,		a :				int )					->					list[str]:
      if partitions <= 0:
            raise ValueError('''partitions must be a positive number!''' )
      if partitions > number_of_bytes:
            raise ValueError('''partitions can not > number_of_bytes!''' )
      __snake_case      :    List[str]  			=number_of_bytes // partitions
      __snake_case      :    str  			=[]
      for i in range(a ):
            __snake_case      :    Optional[Any]  			=i * bytes_per_partition + 1
            __snake_case      :    Any  			=(
                number_of_bytes if i == partitions - 1 else (i + 1) * bytes_per_partition
            )
            allocation_list.append(f'''{start_bytes}-{end_bytes}''' )
      return allocation_list


if __name__ == "__main__":
    import doctest

    doctest.testmod()


