






"""simple docstring"""




def 		_UpperCamelCase				(      UpperCamelCase_    :   str						)					->				list:

						"""simple docstring"""



						lowerCAmelCase__        =  [0] * len(UpperCamelCase_						)

						for i in range(1      ,    len(UpperCamelCase_						)						):
												# use last results for better performance - dynamic programming
												lowerCAmelCase__        =  prefix_result[i - 1]
												while j > 0 and input_string[i] != input_string[j]:
																		lowerCAmelCase__        =  prefix_result[j - 1]

												if input_string[i] == input_string[j]:
																		j += 1
												lowerCAmelCase__        =  j

						return prefix_result







def 		_UpperCamelCase				(      UpperCamelCase_    :   str						)					->				int:

						"""simple docstring"""



						return max(prefix_function(UpperCamelCase_						)						)


if __name__ == "__main__":
					import doctest

					doctest.testmod()













from typing import TYPE_CHECKING

# rely on isort to merge the imports
from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


__snake_case      :      Dict             =       {"""configuration_focalnet""": ["""FOCALNET_PRETRAINED_CONFIG_ARCHIVE_MAP""", """FocalNetConfig"""]}


try:
					if not is_torch_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					__snake_case      :      str             =       [
					    """FOCALNET_PRETRAINED_MODEL_ARCHIVE_LIST""",
					    """FocalNetForImageClassification""",
					    """FocalNetForMaskedImageModeling""",
					    """FocalNetBackbone""",
					    """FocalNetModel""",
					    """FocalNetPreTrainedModel""",
					]

if TYPE_CHECKING:
					from .configuration_focalnet import FOCALNET_PRETRAINED_CONFIG_ARCHIVE_MAP, FocalNetConfig

					try:
										if not is_torch_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_focalnet import (
										    FOCALNET_PRETRAINED_MODEL_ARCHIVE_LIST,
										    FocalNetBackbone,
										    FocalNetForImageClassification,
										    FocalNetForMaskedImageModeling,
										    FocalNetModel,
										    FocalNetPreTrainedModel,
										)

else:
					import sys

					__snake_case      :      List[Any]             =       _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)





