code: def _partition_of_index_value(divisions, val):
      """In which partition does this value lie?
  
      >>> _partition_of_index_value([0, 5, 10], 3)
      0
      >>> _partition_of_index_value([0, 5, 10], 8)
      1
      >>> _partition_of_index_value([0, 5, 10], 100)
      1
      >>> _partition_of_index_value([0, 5, 10], 5)  # left-inclusive divisions
      1
      """
      if divisions[0] is None:
          msg = "Can not use loc on DataFrame without known divisions"
          raise ValueError(msg)
      val = _coerce_loc_index(divisions, val)
      i = bisect.bisect_right(divisions, val)
      return min(len(divisions) - 2, max(0, i - 1))
  
imports: from __future__ import annotations
  import bisect
  from collections import defaultdict
  from datetime import datetime
  import numpy
  import pandas
  from pandas.api.types import is_bool_dtype
  from dask.array.core import Array
  from dask.base import tokenize
  from dask.dataframe import methods
  from dask.dataframe._compat import IndexingError
  from dask.dataframe.core import Series, new_dd_object
  from dask.dataframe.utils import is_index_like, is_series_like, meta_nonempty
  from dask.highlevelgraph import HighLevelGraph
  from dask.utils import is_arraylike
label_desc: Use image node_id 1 for calling a global function with example usage: _partition_of_index_value(divisions, val) and returns: min