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 collections import defaultdict
  from typing import List, Sequence
  from flash.core.utilities.imports import _TOPIC_SERVE_AVAILABLE
label_desc: Use image node_id 4 for calling a global function with example usage: lists_to_tuples(res, keys) and returns: res, tuple