


'''simple docstring'''

from __future__ import annotations

import bisect






def __UpperCamelCase   (			__lowerCamelCase		: list[int]      ,  __lowerCamelCase		: int      ,  __lowerCamelCase		: int = 0      ,  __lowerCamelCase		: int = -1				)      ->     int:







     '''simple docstring'''






     if hi < 0:
          _a						=		len(__lowerCamelCase				)

     while lo < hi:
          _a						=		lo + (hi - lo) // 2
          if sorted_collection[mid] < item:
               _a						=		mid + 1
          else:
               _a						=		mid

     return lo






def __UpperCamelCase   (			__lowerCamelCase		: list[int]      ,  __lowerCamelCase		: int      ,  __lowerCamelCase		: int = 0      ,  __lowerCamelCase		: int = -1				)      ->     int:







     '''simple docstring'''






     if hi < 0:
          _a						=		len(__lowerCamelCase				)

     while lo < hi:
          _a						=		lo + (hi - lo) // 2
          if sorted_collection[mid] <= item:
               _a						=		mid + 1
          else:
               _a						=		mid

     return lo






def __UpperCamelCase   (			__lowerCamelCase		: list[int]      ,  __lowerCamelCase		: int      ,  __lowerCamelCase		: int = 0      ,  __lowerCamelCase		: int = -1				)      ->     None:







     '''simple docstring'''






     sorted_collection.insert(bisect_left(__lowerCamelCase      ,  __lowerCamelCase      ,  __lowerCamelCase      ,  __lowerCamelCase				)      ,  __lowerCamelCase				)






def __UpperCamelCase   (			__lowerCamelCase		: list[int]      ,  __lowerCamelCase		: int      ,  __lowerCamelCase		: int = 0      ,  __lowerCamelCase		: int = -1				)      ->     None:







     '''simple docstring'''






     sorted_collection.insert(bisect_right(__lowerCamelCase      ,  __lowerCamelCase      ,  __lowerCamelCase      ,  __lowerCamelCase				)      ,  __lowerCamelCase				)






def __UpperCamelCase   (			__lowerCamelCase		: list[int]      ,  __lowerCamelCase		: int				)      ->     int | None:







     '''simple docstring'''






     _a						=		0
     _a						=		len(__lowerCamelCase				) - 1

     while left <= right:
          _a						=		left + (right - left) // 2
          _a						=		sorted_collection[midpoint]
          if current_item == item:
               return midpoint
          elif item < current_item:
               _a						=		midpoint - 1
          else:
               _a						=		midpoint + 1
     return None






def __UpperCamelCase   (			__lowerCamelCase		: list[int]      ,  __lowerCamelCase		: int				)      ->     int | None:







     '''simple docstring'''






     _a						=		bisect.bisect_left(__lowerCamelCase      ,  __lowerCamelCase				)
     if index != len(__lowerCamelCase				) and sorted_collection[index] == item:
          return index
     return None






def __UpperCamelCase   (			__lowerCamelCase		: list[int]      ,  __lowerCamelCase		: int      ,  __lowerCamelCase		: int      ,  __lowerCamelCase		: int				)      ->     int | None:







     '''simple docstring'''






     if right < left:
          return None

     _a						=		left + (right - left) // 2

     if sorted_collection[midpoint] == item:
          return midpoint
     elif sorted_collection[midpoint] > item:
          return binary_search_by_recursion(__lowerCamelCase      ,  __lowerCamelCase      ,  __lowerCamelCase      ,  midpoint - 1				)
     else:
          return binary_search_by_recursion(__lowerCamelCase      ,  __lowerCamelCase      ,  midpoint + 1      ,  __lowerCamelCase				)


if __name__ == "__main__":
   lowercase__				     =		input("Enter numbers separated by comma:\n").strip()
   lowercase__				     =		sorted(int(item) for item in user_input.split(","))
   lowercase__				     =		int(input("Enter a single number to be found in the list:\n"))
   lowercase__				     =		binary_search(collection, target)
   if result is None:
      print(f'''{target} was not found in {collection}.''')
   else:
      print(f'''{target} was found at position {result} in {collection}.''')





'''simple docstring'''

from typing import TYPE_CHECKING

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


lowercase__				     =		{
    "configuration_mctct": ["MCTCT_PRETRAINED_CONFIG_ARCHIVE_MAP", "MCTCTConfig"],
    "feature_extraction_mctct": ["MCTCTFeatureExtractor"],
    "processing_mctct": ["MCTCTProcessor"],
}


try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   lowercase__				     =		[
       "MCTCT_PRETRAINED_MODEL_ARCHIVE_LIST",
       "MCTCTForCTC",
       "MCTCTModel",
       "MCTCTPreTrainedModel",
   ]


if TYPE_CHECKING:
   from .configuration_mctct import MCTCT_PRETRAINED_CONFIG_ARCHIVE_MAP, MCTCTConfig
   from .feature_extraction_mctct import MCTCTFeatureExtractor
   from .processing_mctct import MCTCTProcessor

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_mctct import MCTCT_PRETRAINED_MODEL_ARCHIVE_LIST, MCTCTForCTC, MCTCTModel, MCTCTPreTrainedModel

else:
   import sys

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

