
'''simple docstring'''



from __future__ import annotations


def A				(__lowerCamelCase				:int			,     __lowerCamelCase				:int		):
						if partitions <= 0:
												raise ValueError("""partitions must be a positive number!"""		)
						if partitions > number_of_bytes:
												raise ValueError("""partitions can not > number_of_bytes!"""		)
						_lowerCAmelCase  						=			number_of_bytes // partitions
						_lowerCAmelCase  						=			[]
						for i in range(__lowerCamelCase		):
												_lowerCAmelCase  						=			i * bytes_per_partition + 1
												_lowerCAmelCase  						=			(
												    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()


'''simple docstring'''



from typing import TYPE_CHECKING

from ....utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


_lowercase    =		{"""configuration_van""": ["""VAN_PRETRAINED_CONFIG_ARCHIVE_MAP""", """VanConfig"""]}


try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						_lowercase    =		[
						    """VAN_PRETRAINED_MODEL_ARCHIVE_LIST""",
						    """VanForImageClassification""",
						    """VanModel""",
						    """VanPreTrainedModel""",
						]

if TYPE_CHECKING:
						from .configuration_van import VAN_PRETRAINED_CONFIG_ARCHIVE_MAP, VanConfig

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_van import (
												    VAN_PRETRAINED_MODEL_ARCHIVE_LIST,
												    VanForImageClassification,
												    VanModel,
												    VanPreTrainedModel,
												)

else:
						import sys

						_lowercase    =		_LazyModule(__name__, globals()["""__file__"""], _import_structure)
