
from typing import TYPE_CHECKING

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


lowerCamelCase__          =		{
    """configuration_poolformer""": [
        """POOLFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """PoolFormerConfig""",
        """PoolFormerOnnxConfig""",
    ]
}

try:
					if not is_vision_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					lowerCamelCase__          =		["""PoolFormerFeatureExtractor"""]
					lowerCamelCase__          =		["""PoolFormerImageProcessor"""]

try:
					if not is_torch_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					lowerCamelCase__          =		[
					    """POOLFORMER_PRETRAINED_MODEL_ARCHIVE_LIST""",
					    """PoolFormerForImageClassification""",
					    """PoolFormerModel""",
					    """PoolFormerPreTrainedModel""",
					]


if TYPE_CHECKING:
					from .configuration_poolformer import (
					    POOLFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
					    PoolFormerConfig,
					    PoolFormerOnnxConfig,
					)

					try:
										if not is_vision_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .feature_extraction_poolformer import PoolFormerFeatureExtractor
										from .image_processing_poolformer import PoolFormerImageProcessor

					try:
										if not is_torch_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_poolformer import (
										    POOLFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
										    PoolFormerForImageClassification,
										    PoolFormerModel,
										    PoolFormerPreTrainedModel,
										)


else:
					import sys

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

class      A__							:






				def __init__(						self					:      Dict    ,     a					:      list[int]   ):






							'''simple docstring'''







							lowerCAmelCase__      :      Union[str, Any]         =		len(a   )
							lowerCAmelCase__      :      Optional[Any]         =		[0] * len_array

							if len_array > 0:
										lowerCAmelCase__      :      List[Any]         =		array[0]

							for i in range(1    ,     a   ):
										lowerCAmelCase__      :      Optional[int]         =		self.prefix_sum[i - 1] + array[i]






				def 							_lowerCamelCase		(						self					:      int    ,     a					:      int    ,     a					:      int   ):






							'''simple docstring'''







							if start == 0:
										return self.prefix_sum[end]

							return self.prefix_sum[end] - self.prefix_sum[start - 1]






				def 							_lowerCamelCase		(						self					:      Optional[Any]    ,     a					:      int   ):






							'''simple docstring'''







							lowerCAmelCase__      :      Any         =		{0}
							for sum_item in self.prefix_sum:
										if sum_item - target_sum in sums:
													return True

										sums.add(a   )

							return False


if __name__ == "__main__":
					import doctest

					doctest.testmod()