


def 		lowercase_(  SCREAMING_SNAKE_CASE_				,						SCREAMING_SNAKE_CASE_				,						SCREAMING_SNAKE_CASE_				,						SCREAMING_SNAKE_CASE_     ):


		'''simple docstring'''

		lowerCamelCase			: Optional[int]   =    int((lower_bound + upper_bound) // 2     )
		if array[r] == value:
				return r
		if lower_bound >= upper_bound:
				return -1
		if array[r] < value:
				return binary_search(SCREAMING_SNAKE_CASE_				,						r + 1				,						SCREAMING_SNAKE_CASE_				,						SCREAMING_SNAKE_CASE_     )
		else:
				return binary_search(SCREAMING_SNAKE_CASE_				,						SCREAMING_SNAKE_CASE_				,						r - 1				,						SCREAMING_SNAKE_CASE_     )






def 		lowercase_(  SCREAMING_SNAKE_CASE_				,						SCREAMING_SNAKE_CASE_     ):


		'''simple docstring'''

		lowerCamelCase			: Optional[int]   =    0
		if matrix[index][0] == value:
				return [index, 0]
		while index < len(SCREAMING_SNAKE_CASE_     ) and matrix[index][0] < value:
				lowerCamelCase			: Dict   =    binary_search(matrix[index]				,						0				,						len(matrix[index]     ) - 1				,						SCREAMING_SNAKE_CASE_     )
				if r != -1:
						return [index, r]
				index += 1
		return [-1, -1]


if __name__ == "__main__":
			import doctest

			doctest.testmod()







from typing import TYPE_CHECKING

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


_snake_case					=					{
    '''configuration_rwkv''': ['''RWKV_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''RwkvConfig''', '''RwkvOnnxConfig'''],
}

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   _snake_case					=					[
       '''RWKV_PRETRAINED_MODEL_ARCHIVE_LIST''',
       '''RwkvForCausalLM''',
       '''RwkvModel''',
       '''RwkvPreTrainedModel''',
   ]


if TYPE_CHECKING:
   from .configuration_rwkv import RWKV_PRETRAINED_CONFIG_ARCHIVE_MAP, RwkvConfig, RwkvOnnxConfig

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_rwkv import (
          RWKV_PRETRAINED_MODEL_ARCHIVE_LIST,
          RwkvForCausalLM,
          RwkvModel,
          RwkvPreTrainedModel,
      )
else:
   import sys

   _snake_case					=					_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)



