# Stubs for bisect

from typing import Any, Sequence, TypeVar

_T = TypeVar('_T')

# TODO uncomment when mypy# 2035 is fixed
# def bisect_left(a: Sequence[_T], x: _T, lo: int = ..., hi: int = ...) -> int: ...
# def bisect_right(a: Sequence[_T], x: _T, lo: int = ..., hi: int = ...) -> int: ...
# def bisect(a: Sequence[_T], x: _T, lo: int = ..., hi: int = ...) -> int: ...
#
# def insort_left(a: Sequence[_T], x: _T, lo: int = ..., hi: int = ...) -> int: ...
# def insort_right(a: Sequence[_T], x: _T, lo: int = ..., hi: int = ...) -> int: ...
# def insort(a: Sequence[_T], x: _T, lo: int = ..., hi: int = ...) -> int: ...

def bisect_left(a: Sequence, x: Any, lo: int = ..., hi: int = ...) -> int: ...
def bisect_right(a: Sequence, x: Any, lo: int = ..., hi: int = ...) -> int: ...
def bisect(a: Sequence, x: Any, lo: int = ..., hi: int = ...) -> int: ...

def insort_left(a: Sequence, x: Any, lo: int = ..., hi: int = ...) -> int: ...
def insort_right(a: Sequence, x: Any, lo: int = ..., hi: int = ...) -> int: ...
def insort(a: Sequence, x: Any, lo: int = ..., hi: int = ...) -> int: ...
