






'''simple docstring'''







from __future__ import annotations


def     _UpperCamelCase				(  snake_case__				,      snake_case__				,      snake_case__				,      snake_case__				):
      __A ,					__A		 =   m - 1, 0
      while i >= 0 and j < n:
            if key == mat[i][j]:
                  print(f"Key {key} found at row- {i + 1} column- {j + 1}"				)
                  return
            if key < mat[i][j]:
                  i -= 1
            else:
                  j += 1
      print(f"Key {key} not found"				)


def     _UpperCamelCase				(  ):
      __A		 =   [[2, 5, 7], [4, 8, 13], [9, 11, 15], [12, 17, 20]]
      __A		 =   int(input("Enter the element to be searched:"				)				)
      print(snake_case__				)
      search_in_a_sorted_matrix(snake_case__				,      len(snake_case__				)				,      len(mat[0]				)				,      snake_case__				)


if __name__ == "__main__":
       import doctest

       doctest.testmod()
       main()










'''simple docstring'''







import inspect
import os
import unittest

import torch

import accelerate
from accelerate import debug_launcher
from accelerate.test_utils import (
    execute_subprocess_async,
    require_cpu,
    require_multi_gpu,
    require_single_gpu,
    test_sync,
)
from accelerate.utils import patch_environment






class        a__     (      unittest.TestCase    ):
     '''simple docstring'''







     def      _UpperCamelCase (self     :						int       )	->							Optional[int]:
           __A		 =   inspect.getfile(accelerate.test_utils       )
           __A		 =   os.path.sep.join(mod_file.split(os.path.sep       )[:-1] + ["scripts", "test_sync.py"]       )






     @require_cpu
     def      _UpperCamelCase (self     :						str       )	->							Optional[Any]:
           debug_launcher(test_sync.main					,					num_processes=1       )






     @require_cpu
     def      _UpperCamelCase (self     :						Union[str, Any]       )	->							Optional[Any]:
           debug_launcher(test_sync.main       )






     @require_single_gpu
     def      _UpperCamelCase (self     :						Union[str, Any]       )	->							List[str]:
           test_sync.main()






     @require_multi_gpu
     def      _UpperCamelCase (self     :						Optional[int]       )	->							List[str]:
           print(f"Found {torch.cuda.device_count()} devices."       )
           __A		 =   ["torchrun", f"--nproc_per_node={torch.cuda.device_count()}", self.test_file_path]
           with patch_environment(omp_num_threads=1       ):
                 execute_subprocess_async(lowercase__					,					env=os.environ.copy()       )


