code: def _partitions_of_index_values(divisions, values):
      """Return defaultdict of division and values pairs
      Each key corresponds to the division which values are index values belong
      to the division.
  
      >>> sorted(_partitions_of_index_values([0, 5, 10], [3]).items())
      [(0, [3])]
      >>> sorted(_partitions_of_index_values([0, 5, 10], [3, 8, 5]).items())
      [(0, [3]), (1, [8, 5])]
      """
      if divisions[0] is None:
          msg = "Can not use loc on DataFrame without known divisions"
          raise ValueError(msg)
  
      results = defaultdict(list)
      for val in values:
          i = bisect.bisect_right(divisions, val)
          div = min(len(divisions) - 2, max(0, i - 1))
          results[div].append(val)
      return results
  
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 2 for calling a global function with example usage: _partitions_of_index_values(divisions, values) and returns: results