code: def expand_tuples(L):
      """
      >>> from sympy.multipledispatch.utils import expand_tuples
      >>> expand_tuples([1, (2, 3)])
      [(1, 2), (1, 3)]
  
      >>> expand_tuples([1, 2])
      [(1, 2)]
      """
      if not L:
          return [()]
      elif not isinstance(L[0], tuple):
          rest = expand_tuples(L[1:])
          return [(L[0],) + t for t in rest]
      else:
          rest = expand_tuples(L[1:])
          return [(item,) + t for t in rest for item in L[0]]
  
imports: from collections import OrderedDict
label_desc: Use image node_id 1 for calling a global function with example usage: expand_tuples(L) and returns: list, unknown, unknown