code: def _workers_to_parts(futures):
      """
      Builds an ordered dict mapping each worker to their list
      of parts
      :param futures: list of (worker, part) tuples
      :return:
      """
      w_to_p_map = OrderedDict()
      for w, p in futures:
          if w not in w_to_p_map:
              w_to_p_map[w] = []
          w_to_p_map[w].append(p)
      return w_to_p_map
  
imports: import dask.dataframe
  from functools import reduce
  from toolz import first
  from dask.distributed import default_client
  from dask.distributed import wait
  from cuml.dask.common.part_utils import _extract_partitions
  from cuml.dask.common.dask_arr_utils import validate_dask_array
  from cuml.dask.common.dask_df_utils import to_dask_cudf
  from cuml.dask.common.utils import get_client
  from dask_cudf.core import Series
  from dask.dataframe import Series
  from dask.dataframe import DataFrame
  from cudf import Series
  from cuml.internals.safe_imports import gpu_only_import_from
  from collections import OrderedDict
  from cuml.internals.memory_utils import with_cupy_rmm
  from collections.abc import Sequence
  import dask.array
  from cuml.internals.safe_imports import cpu_only_import
  import cuml.internals.logger
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 6 for calling a global function with example usage: _workers_to_parts(futures) and returns: w_to_p_map