


'''simple docstring'''
def       a				(      __a       )  ->     list:



					'''simple docstring'''






					UpperCamelCase__       :Tuple							 =			[0] * len(__a       )

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

										if input_string[i] == input_string[j]:
															j += 1
										UpperCamelCase__       :int							 =			j

					return prefix_result


def       a				(      __a       )  ->     int:



					'''simple docstring'''






					return max(prefix_function(__a       )       )


if __name__ == "__main__":
		import doctest

		doctest.testmod()



'''simple docstring'''
from argparse import ArgumentParser

from .env import EnvironmentCommand


def       a				(      )  ->     Union[str, Any]:



					'''simple docstring'''






					UpperCamelCase__       :Union[str, Any]							 =			ArgumentParser('''Diffusers CLI tool'''			, usage='''diffusers-cli <command> [<args>]'''       )
					UpperCamelCase__       :Union[str, Any]							 =			parser.add_subparsers(help='''diffusers-cli command helpers'''       )

					# Register commands
					EnvironmentCommand.register_subcommand(__a       )

					# Let's go
					UpperCamelCase__       :Optional[int]							 =			parser.parse_args()

					if not hasattr(__a			, '''func'''       ):
										parser.print_help()
										exit(1       )

					# Run
					UpperCamelCase__       :Optional[int]							 =			args.func(__a       )
					service.run()


if __name__ == "__main__":
		main()