code: def lol_product(head, values):
      """List of list of tuple keys, similar to `itertools.product`.
  
      Parameters
      ----------
      head : tuple
          Prefix prepended to all results.
      values : sequence
          Mix of singletons and lists. Each list is substituted with every
          possible value and introduces another level of list in the output.
  
      Examples
      --------
      >>> lol_product(('x',), (1, 2, 3))
      ('x', 1, 2, 3)
      >>> lol_product(('x',), (1, [2, 3], 4, [5, 6]))  # doctest: +NORMALIZE_WHITESPACE
      [[('x', 1, 2, 4, 5), ('x', 1, 2, 4, 6)],
       [('x', 1, 3, 4, 5), ('x', 1, 3, 4, 6)]]
      """
      if not values:
          return head
      elif isinstance(values[0], list):
          return [
              lol_product(head + (x,), values[1:]) for x in values[0]
          ]
      else:
          return lol_product(head + (values[0],), values[1:])
  
imports: from __future__ import annotations
  import itertools
  import os
  from collections.abc import Hashable, Iterable, Mapping, Sequence
  from itertools import product
  from math import prod
  from typing import Any
  import tlz
  import dask
  from dask.base import clone_key, get_name_from_key, tokenize
  from dask.core import flatten, ishashable, keys_in_tasks, reverse_dict
  from dask.highlevelgraph import HighLevelGraph, Layer
  from dask.optimization import SubgraphCallable, fuse
  from dask.typing import Graph, Key
  from dask.utils import _deprecated, apply, ensure_dict, homogeneous_deepmap, stringify_collection_keys
label_desc: Use image node_id 7 for calling a global function with example usage: lol_product(head, values) and returns: head, unknown, lol_product