


from __future__ import annotations





def   _UpperCAmelCase       (     UpperCAmelCase      :			list[int | float]						,	UpperCAmelCase      :			int						,	UpperCAmelCase      :			int      ):
      """simple docstring"""




      if len(UpperCAmelCase      ) == 0:
            raise ValueError("""find_max() arg is an empty sequence"""      )
      if (
          left >= len(UpperCAmelCase      )
          or left < -len(UpperCAmelCase      )
          or right >= len(UpperCAmelCase      )
          or right < -len(UpperCAmelCase      )
      ):
            raise IndexError("""list index out of range"""      )
      if left == right:
            return nums[left]
      __lowerCamelCase     :      Any       						=						(left + right) >> 1  # the middle
      __lowerCamelCase     :      Union[str, Any]       						=						find_max(UpperCAmelCase						,	UpperCAmelCase						,	UpperCAmelCase      )  # find max in range[left, mid]
      __lowerCamelCase     :      int       						=						find_max(UpperCAmelCase						,	mid + 1						,	UpperCAmelCase      )  # 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_torch_available


__UpperCamelCase    :						Optional[Any]     =							{
    'configuration_swinv2': ['SWINV2_PRETRAINED_CONFIG_ARCHIVE_MAP', 'Swinv2Config'],
}


try:
    if not is_torch_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    __UpperCamelCase    :						List[Any]     =							[
        'SWINV2_PRETRAINED_MODEL_ARCHIVE_LIST',
        'Swinv2ForImageClassification',
        'Swinv2ForMaskedImageModeling',
        'Swinv2Model',
        'Swinv2PreTrainedModel',
    ]


if TYPE_CHECKING:
    from .configuration_swinva import SWINV2_PRETRAINED_CONFIG_ARCHIVE_MAP, SwinvaConfig

    try:
        if not is_torch_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_swinva import (
            SWINV2_PRETRAINED_MODEL_ARCHIVE_LIST,
            SwinvaForImageClassification,
            SwinvaForMaskedImageModeling,
            SwinvaModel,
            SwinvaPreTrainedModel,
        )


else:
    import sys

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



