code: def expand_compound_dict(m: Union[Dict, List]) -> Union[Dict, List]:
      """given a dictionary with some compound keys, aka tuples,
      returns a dictionary which each compound key separated into primitives
  
      given a list of such dictionaries, will apply the transformation
      described above to each dictionary and return the list, maintaining
      structure
      """
  
      if isinstance(m, list):
          return [expand_compound_dict(mi) for mi in m]
      else:
          expanded_dicts = [
              _expand_compound_pair(k, v) for k, v in m.items()
          ]
          return dict(ChainMap(*expanded_dicts))
  
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 7 for calling a global function with example usage: expand_compound_dict(m) and returns: unknown, dict