code: def _tupleize_compound_value(
      v: Union[List, bool, str, int, float]
  ) -> Union[List, Tuple]:
      """list of lists -> list of tuples
          list of primitives -> tuple of primitives
          single primitive -> length-1 tuple of that primitive
  
      E.g., [[0,1],[3,4]] -> [(0,1),(3,4)]
            [0,1] -> (0,1)
            0 -> (0, )
      """
      if isinstance(v, list):
          if isinstance(v[0], list):
              # v is list of lists
              return [tuple(vi) for vi in v]
          else:
              # v is list of primitives
              return tuple(v)
      else:
          # v is a single primitive (bool, str, int, float)
          return tuple([v])
  
imports: from __future__ import absolute_import, division, print_function
  import argparse
  import itertools
  import re
  import sys
  from collections import ChainMap
  from typing import Any, Dict, List, Optional, Tuple, Union
  import commentjson
  import caliban.util
  import caliban.util.argparse
  import caliban.util.schema
label_desc: Use image node_id 3 for calling a global function with example usage: _tupleize_compound_value(v) and returns: tuple, unknown, tuple