






"""simple docstring"""





def 					lowerCamelCase__	(							_lowerCamelCase	:		int		,    _lowerCamelCase	:		str		,    _lowerCamelCase	:		List[str]		,    _lowerCamelCase	:		Union[str, Any]			)				->    Optional[int]:
		lowerCamelCase_   					=						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(_lowerCamelCase		,    r + 1		,    _lowerCamelCase		,    _lowerCamelCase			)
		else:
				return binary_search(_lowerCamelCase		,    _lowerCamelCase		,    r - 1		,    _lowerCamelCase			)







def 					lowerCamelCase__	(							_lowerCamelCase	:		Optional[int]		,    _lowerCamelCase	:		Optional[int]			)				->    Union[str, Any]:
		lowerCamelCase_   					=						0
		if matrix[index][0] == value:
				return [index, 0]
		while index < len(_lowerCamelCase			) and matrix[index][0] < value:
				lowerCamelCase_   					=						binary_search(matrix[index]		,    0		,    len(matrix[index]			) - 1		,    _lowerCamelCase			)
				if r != -1:
						return [index, r]
				index += 1
		return [-1, -1]


if __name__ == "__main__":
		import doctest

		doctest.testmod()












"""simple docstring"""





from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


_SCREAMING_SNAKE_CASE :    Union[str, Any]    =						{
    '''configuration_decision_transformer''': [
        '''DECISION_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''DecisionTransformerConfig''',
    ],
}

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  _SCREAMING_SNAKE_CASE :    Optional[Any]    =						[
      '''DECISION_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST''',
      '''DecisionTransformerGPT2Model''',
      '''DecisionTransformerGPT2PreTrainedModel''',
      '''DecisionTransformerModel''',
      '''DecisionTransformerPreTrainedModel''',
  ]


if TYPE_CHECKING:
  from .configuration_decision_transformer import (
      DECISION_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
      DecisionTransformerConfig,
  )

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_decision_transformer import (
        DECISION_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
        DecisionTransformerGPTaModel,
        DecisionTransformerGPTaPreTrainedModel,
        DecisionTransformerModel,
        DecisionTransformerPreTrainedModel,
    )


else:
  import sys

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




