



from typing import TYPE_CHECKING

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


A__	      =       {"""configuration_focalnet""": ["""FOCALNET_PRETRAINED_CONFIG_ARCHIVE_MAP""", """FocalNetConfig"""]}


try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	A__	      =       [
	    """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

	A__	      =       _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)










'''simple docstring'''

import functools





def 						UpperCamelCase				(							_lowerCamelCase					:					str						,       _lowerCamelCase					:					str       ):
    A__				=			len(_lowerCamelCase       )
    A__				=			len(_lowerCamelCase       )

    @functools.cache
    def min_distance(_lowerCamelCase					:					int						,       _lowerCamelCase					:					int       ) -> int:
        # if first word index is overflow - delete all from the second word
        if indexa >= len_worda:
            return len_worda - indexa
        # if second word index is overflow - delete all from the first word
        if indexa >= len_worda:
            return len_worda - indexa
        A__				=			int(worda[indexa] != worda[indexa]       )  # current letters not identical
        return min(
            1 + min_distance(indexa + 1						,       _lowerCamelCase       )						,       1 + min_distance(_lowerCamelCase						,       indexa + 1       )						,       diff + min_distance(indexa + 1						,       indexa + 1       )						,       )

    return min_distance(0						,       0       )


if __name__ == "__main__":
  import doctest

  doctest.testmod()



