def _find_lteq(a, x):
 i = bisect_left(a, x)
 if ((i != len(a)) and (a[i] == x)):
  return i
 raise ValueError

def _find_lteq ( a , x ) : i = bisect_left ( a , x ) if ( ( i != len ( a ) ) and ( a [ i ] == x ) ) : return i raise ValueError
locate the leftmost value exactly equal to x .