code: def get_type_group_map(type_map: dict) -> defaultdict:
      type_group_map = defaultdict(list)
      for key, val in type_map.items():
          if isinstance(val, list):
              for feature_type in val:
                  type_group_map[feature_type].append(key)
          else:
              type_group_map[val].append(key)
      return type_group_map
  
file_path: autogluon/common/src/autogluon/common/features/infer_types.py
imports: import logging
  from collections import defaultdict
  from typing import List
  import numpy
  import pandas
  from pandas import DataFrame, Series
label_desc: Use image node_id 6 for calling a global function with example usage: get_type_group_map(type_map) and returns: type_group_map