code: def _get_file_keys_for_reader_files(reader_files, group_keys=None):
      """From a mapping from _assign_files_to_readers, get file keys.
  
      Given a mapping where each key is a reader name and each value is a
      tuple of reader instance (typically FileYAMLReader) and a collection
      of files, return a mapping with the same keys, but where the values are
      lists of tuples of (keys, filename), where keys are extracted from the filenames
      according to group_keys and filenames are the names those keys were
      extracted from.
  
      Internal helper for group_files.
  
      Returns:
          Mapping[str, List[Tuple[Tuple, str]]], as described.
      """
      file_keys = {}
      for reader_name, (
          reader_instance,
          files_to_sort,
      ) in reader_files.items():
          if group_keys is None:
              group_keys = reader_instance.info.get(
                  "group_keys", ("start_time",)
              )
          file_keys[reader_name] = []
          # make a copy because filename_items_for_filetype will modify inplace
          files_to_sort = set(files_to_sort)
          for (
              _,
              filetype_info,
          ) in reader_instance.sorted_filetype_items():
              for (
                  f,
                  file_info,
              ) in reader_instance.filename_items_for_filetype(
                  files_to_sort, filetype_info
              ):
                  group_key = tuple(
                      file_info.get(k) for k in group_keys
                  )
                  if all(g is None for g in group_key):
                      warnings.warn(
                          f"Found matching file {f:s} for reader "
                          "{reader_name:s}, but none of group keys found. "
                          "Group keys requested: "
                          + ", ".join(group_keys),
                          UserWarning,
                          stacklevel=3,
                      )
                  file_keys[reader_name].append((group_key, f))
      return file_keys
  
imports: from __future__ import annotations
  import logging
  import os
  import pathlib
  import pickle
  import warnings
  from datetime import datetime, timedelta
  from functools import total_ordering
  import yaml
  from yaml import UnsafeLoader
  from satpy._config import config_search_paths, get_entry_points_config_dirs, glob_config
  from .yaml_reader import AbstractYAMLReader
  from .yaml_reader import load_yaml_configs
label_desc: Use image node_id 3 for calling a global function with example usage: _get_file_keys_for_reader_files(reader_files, group_keys) and returns: file_keys