


'''simple docstring'''
def 	_A  (       A							,A							)  ->				str:

	if not (isinstance(A							,A							) and isinstance(A							,A							)):
		raise ValueError("longest_common_substring() takes two strings for inputs"							)

	lowercase						:		List[str]   					=		len(A							)
	lowercase						:		Optional[int]   					=		len(A							)

	lowercase						:		Any   					=		[[0] * (texta_length + 1) for _ in range(texta_length + 1							)]
	lowercase						:		int   					=		0
	lowercase						:		Any   					=		0

	for i in range(1							,texta_length + 1							):
		for j in range(1							,texta_length + 1							):
			if texta[i - 1] == texta[j - 1]:
				lowercase						:		str   					=		1 + dp[i - 1][j - 1]
				if dp[i][j] > ans_length:
					lowercase						:		Tuple   					=		i
					lowercase						:		Dict   					=		dp[i][j]

	return texta[ans_index - ans_length : ans_index]


if __name__ == "__main__":
					import doctest

					doctest.testmod()






'''simple docstring'''
from ...utils import (
    OptionalDependencyNotAvailable,
    is_flax_available,
    is_torch_available,
    is_transformers_available,
)


try:
					if not (is_transformers_available() and is_torch_available()):
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					from ...utils.dummy_torch_and_transformers_objects import *  # noqa F403
else:
					from .multicontrolnet import MultiControlNetModel
					from .pipeline_controlnet import StableDiffusionControlNetPipeline
					from .pipeline_controlnet_imgaimg import StableDiffusionControlNetImgaImgPipeline
					from .pipeline_controlnet_inpaint import StableDiffusionControlNetInpaintPipeline


if is_transformers_available() and is_flax_available():
					from .pipeline_flax_controlnet import FlaxStableDiffusionControlNetPipeline


