code: def _group_datasets_in_scenes(scenes, groups):
      """Group different datasets in multiple scenes by adding aliases.
  
      Args:
          scenes (iterable): Scenes to be processed.
          groups (dict): Groups of datasets that shall be treated equally by
              MultiScene. Keys specify the groups, values specify the dataset
              names to be grouped. For example::
  
                  from satpy import DataQuery
                  groups = {DataQuery(name='odd'): ['ds1', 'ds3'],
                            DataQuery(name='even'): ['ds2', 'ds4']}
  
      """
      for scene in scenes:
          grp = _GroupAliasGenerator(scene, groups)
          yield grp.duplicate_datasets_with_group_alias()
  
imports: from __future__ import annotations
  import copy
  import logging
  import warnings
  from queue import Queue
  from threading import Thread
  from typing import Callable, Collection, Mapping
  import dask.array
  import numpy
  import xarray
  from satpy.dataset import DataID
  from satpy.scene import Scene
  from satpy.writers import get_enhanced_image, split_results
label_desc: Use image node_id 1 for calling a global function with example usage: _group_datasets_in_scenes(scenes, groups) without return types