


from ..utils import DummyObject, requires_backends






class        UpperCAmelCase__			(   metaclass=A_						):



    """simple docstring"""






    UpperCAmelCase__		:						str    =    ["torch", "transformers", "invisible_watermark"]






    def __init__(     self   ,  *A_   ,  **A_       )    ->			Optional[int]:
         requires_backends(self   ,  ['torch', 'transformers', 'invisible_watermark']       )






    @classmethod
    def _a   (     cls   ,  *A_   ,  **A_       )    ->			Any:
         requires_backends(cls   ,  ['torch', 'transformers', 'invisible_watermark']       )






    @classmethod
    def _a   (     cls   ,  *A_   ,  **A_       )    ->			Union[str, Any]:
         requires_backends(cls   ,  ['torch', 'transformers', 'invisible_watermark']       )






class        UpperCAmelCase__			(   metaclass=A_						):



    """simple docstring"""






    UpperCAmelCase__		:						Tuple    =    ["torch", "transformers", "invisible_watermark"]






    def __init__(     self   ,  *A_   ,  **A_       )    ->			List[str]:
         requires_backends(self   ,  ['torch', 'transformers', 'invisible_watermark']       )






    @classmethod
    def _a   (     cls   ,  *A_   ,  **A_       )    ->			Optional[Any]:
         requires_backends(cls   ,  ['torch', 'transformers', 'invisible_watermark']       )






    @classmethod
    def _a   (     cls   ,  *A_   ,  **A_       )    ->			int:
         requires_backends(cls   ,  ['torch', 'transformers', 'invisible_watermark']       )









def 		_UpperCAmelCase							(     SCREAMING_SNAKE_CASE__     :   list     ,	SCREAMING_SNAKE_CASE__     :   int     ,	SCREAMING_SNAKE_CASE__     :   int     ,	SCREAMING_SNAKE_CASE__     :   int							):
     __UpperCamelCase       				=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 		_UpperCAmelCase							(     SCREAMING_SNAKE_CASE__     :   int     ,	SCREAMING_SNAKE_CASE__     :   list							):
     __UpperCamelCase       				=0
     if matrix[index][0] == value:
          return [index, 0]
     while index < len(SCREAMING_SNAKE_CASE__							) and matrix[index][0] < value:
          __UpperCamelCase       				=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()





