code: def combine_metadata(*metadata_objects, average_times=True):
      """Combine the metadata of two or more Datasets.
  
      If the values corresponding to any keys are not equal or do not
      exist in all provided dictionaries then they are not included in
      the returned dictionary.  By default any keys with the word 'time'
      in them and consisting of datetime objects will be averaged. This
      is to handle cases where data were observed at almost the same time
      but not exactly.  In the interest of time, lazy arrays are compared by
      object identity rather than by their contents.
  
      Args:
          *metadata_objects: MetadataObject or dict objects to combine
          average_times (bool): Average any keys with 'time' in the name
  
      Returns:
          dict: the combined metadata
  
      """
      info_dicts = _get_valid_dicts(metadata_objects)
  
      if len(info_dicts) == 1:
          return info_dicts[0].copy()
  
      shared_keys = _shared_keys(info_dicts)
  
      return _combine_shared_info(
          shared_keys, info_dicts, average_times
      )
  
imports: from collections.abc import Collection
  from datetime import datetime
  from functools import partial, reduce
  from operator import eq, is_
  import numpy
  from satpy.writers.utils import flatten_dict
label_desc: Use image node_id 1 for calling a global function with example usage: combine_metadata() and returns: _combine_shared_info, info_dicts