import bisect


def find_max_revision_index(revisions_list, revision):
  """Find the max index for bisection. Find smallest revision >= the given
  revision."""
  index = bisect.bisect_left(revisions_list, revision)
  if index < len(revisions_list):
    return index

  # No revisions >= given revision.
  return None