



from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


a	:   List[str]       			=       {
    'configuration_blip_2': [
        'BLIP_2_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'Blip2Config',
        'Blip2QFormerConfig',
        'Blip2VisionConfig',
    ],
    'processing_blip_2': ['Blip2Processor'],
}

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	a	:   Any       			=       [
	    'BLIP_2_PRETRAINED_MODEL_ARCHIVE_LIST',
	    'Blip2Model',
	    'Blip2QFormerModel',
	    'Blip2PreTrainedModel',
	    'Blip2ForConditionalGeneration',
	    'Blip2VisionModel',
	]

if TYPE_CHECKING:
	from .configuration_blip_a import (
	    BLIP_2_PRETRAINED_CONFIG_ARCHIVE_MAP,
	    BlipaConfig,
	    BlipaQFormerConfig,
	    BlipaVisionConfig,
	)
	from .processing_blip_a import BlipaProcessor

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_blip_a import (
		    BLIP_2_PRETRAINED_MODEL_ARCHIVE_LIST,
		    BlipaForConditionalGeneration,
		    BlipaModel,
		    BlipaPreTrainedModel,
		    BlipaQFormerModel,
		    BlipaVisionModel,
		)

else:
	import sys

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













from __future__ import annotations






def lowerCamelCase__    (							snake_case_	:  list[int]       )      ->				list[int]:  # This function is recursive
   __snake_case							       =   len(snake_case_       )
   # If the array contains only one element, we return it (it's the stop condition of
   # recursion)
   if array_length <= 1:
      return array
      # Else
   __snake_case							       =   array[0]
   __snake_case							       =   False
   __snake_case							       =   1
   __snake_case							       =   []
   while not is_found and i < array_length:
      if array[i] < pivot:
         __snake_case							       =   True
         __snake_case							       =   [element for element in array[i:] if element >= array[i]]
         __snake_case							       =   longest_subsequence(snake_case_       )
         if len(snake_case_       ) > len(snake_case_       ):
            __snake_case							       =   temp_array
      else:
         i += 1

   __snake_case							       =   [element for element in array[1:] if element >= pivot]
   __snake_case							       =   [pivot, *longest_subsequence(snake_case_       )]
   if len(snake_case_       ) > len(snake_case_       ):
      return temp_array
   else:
      return longest_subseq


if __name__ == "__main__":
    import doctest

    doctest.testmod()

