




'''simple docstring'''


from __future__ import annotations


def     SCREAMING_SNAKE_CASE							(   a_						:				Optional[Any]					,       a_						:				Union[str, Any]					,       a_						:				str      ):
  if len(__lowerCAmelCase      ) == 0:
    raise ValueError('find_max() arg is an empty sequence'      )
  if (
      left >= len(__lowerCAmelCase      )
      or left < -len(__lowerCAmelCase      )
      or right >= len(__lowerCAmelCase      )
      or right < -len(__lowerCAmelCase      )
  ):
    raise IndexError('list index out of range'      )
  if left == right:
    return nums[left]
  __a								=       (left + right) >> 1  # the middle
  __a								=       find_max(__lowerCAmelCase					,       __lowerCAmelCase					,       __lowerCAmelCase      )  # find max in range[left, mid]
  __a								=       find_max(__lowerCAmelCase					,       mid + 1					,       __lowerCAmelCase      )  # find max in range[mid + 1, right]

  return left_max if left_max >= right_max else right_max


if __name__ == "__main__":
  import doctest

  doctest.testmod(verbose=True)









from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tokenizers_available, is_torch_available


__magic_name__  :  Union[str, Any]					=       {
    """configuration_altclip""": [
        """ALTCLIP_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """AltCLIPConfig""",
        """AltCLIPTextConfig""",
        """AltCLIPVisionConfig""",
    ],
    """processing_altclip""": ["""AltCLIPProcessor"""],
}

try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      __magic_name__  :  str					=       [
          """ALTCLIP_PRETRAINED_MODEL_ARCHIVE_LIST""",
          """AltCLIPPreTrainedModel""",
          """AltCLIPModel""",
          """AltCLIPTextModel""",
          """AltCLIPVisionModel""",
      ]


if TYPE_CHECKING:
      from .configuration_altclip import (
          ALTCLIP_PRETRAINED_CONFIG_ARCHIVE_MAP,
          AltCLIPConfig,
          AltCLIPTextConfig,
          AltCLIPVisionConfig,
      )
      from .processing_altclip import AltCLIPProcessor

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_altclip import (
                ALTCLIP_PRETRAINED_MODEL_ARCHIVE_LIST,
                AltCLIPModel,
                AltCLIPPreTrainedModel,
                AltCLIPTextModel,
                AltCLIPVisionModel,
            )


else:
      import sys

      __magic_name__  :  str					=       _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)

