
from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_torch_available,
)


_lowercase											=    {
    """configuration_falcon""": ["""FALCON_PRETRAINED_CONFIG_ARCHIVE_MAP""", """FalconConfig"""],
}

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 _lowercase											=    [
     """FALCON_PRETRAINED_MODEL_ARCHIVE_LIST""",
     """FalconForCausalLM""",
     """FalconModel""",
     """FalconPreTrainedModel""",
     """FalconForSequenceClassification""",
     """FalconForTokenClassification""",
     """FalconForQuestionAnswering""",
 ]


if TYPE_CHECKING:
 from .configuration_falcon import FALCON_PRETRAINED_CONFIG_ARCHIVE_MAP, FalconConfig

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_falcon import (
      FALCON_PRETRAINED_MODEL_ARCHIVE_LIST,
      FalconForCausalLM,
      FalconForQuestionAnswering,
      FalconForSequenceClassification,
      FalconForTokenClassification,
      FalconModel,
      FalconPreTrainedModel,
  )


else:
 import sys

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


from __future__ import annotations
def 							SCREAMING_SNAKE_CASE_	(					UpperCAmelCase_	:     list[int | float]			,							UpperCAmelCase_	:     int			,							UpperCAmelCase_	:     int				)			->						int | float:
       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]
       SCREAMING_SNAKE_CASE_							:				Optional[int]		=(left + right) >> 1  # the middle
       SCREAMING_SNAKE_CASE_							:				Dict		=find_max(UpperCAmelCase_			,							UpperCAmelCase_			,							UpperCAmelCase_				)  # find max in range[left, mid]
       SCREAMING_SNAKE_CASE_							:				Dict		=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)
