code: def lists_to_tuples(res, keys):
      if isinstance(keys, list):
          return tuple(lists_to_tuples(r, k) for r, k in zip(res, keys))
      return res
  
imports: from __future__ import annotations
  from collections import defaultdict
  from collections.abc import Collection, Iterable, Mapping
  from typing import Any, Literal, TypeVar, cast, overload
  from dask.typing import Graph, Key, NoDefault, no_default
label_desc: Use image node_id 5 for calling a global function with example usage: lists_to_tuples(res, keys) and returns: res, tuple