original_docstring: Return the nearest index of value x from iterable a.
docstring: Return the nearest index of value x from iterable a.
docstring_tokens: Return the nearest index of value x from iterable a .
code: def binary_search(a, x, lo=0, hi=None):
    """Return the nearest index of value x from iterable a."""
    hi = hi if hi is not None else len(a)
    pos = bisect_left(a, x, lo, hi)
    return pos
code_tokens: def binary_search ( a , x , lo = 0 , hi = None ) : hi = hi if hi is not None else len ( a ) pos = bisect_left ( a , x , lo , hi ) return pos
short_docstring: Return the nearest index of value x from iterable a.
short_docstring_tokens: Return the nearest index of value x from iterable a .
comment: """Return the nearest index of value x from iterable a."""