code: def tablemergekeys():
      def mergekeys(tbl):
          mergetbl = {}
          if isinstance(tbl, dict):
              for idx, elem in tbl.items():
                  for key, value in elem.items():
                      if key not in mergetbl:
                          mergetbl[key] = {}
                      mergetbl[key][idx] = value
          elif isinstance(tbl, list):
              for elem in tbl:
                  for key, value in elem.items():
                      if key not in mergetbl:
                          mergetbl[key] = []
                      mergetbl[key].append(value)
          return mergetbl
  
      return mergekeys
  
imports: from six import iteritems
  from .table import canmergetensor
  from .table import mergetensor
label_desc: Use image node_id 2 for calling a global function with example usage: tablemergekeys() and returns: mergekeys, mergetbl