code: def configs_for_reader(reader=None):
      """Generate reader configuration files for one or more readers.
  
      Args:
          reader (Optional[str]): Yield configs only for this reader
  
      Returns: Generator of lists of configuration files
  
      """
      if reader is not None:
          if not isinstance(reader, (list, tuple)):
              reader = [reader]
  
          reader = get_valid_reader_names(reader)
          # given a config filename or reader name
          config_files = [
              r if r.endswith(".yaml") else r + ".yaml" for r in reader
          ]
      else:
          paths = get_entry_points_config_dirs("satpy.readers")
          reader_configs = glob_config(
              os.path.join("readers", "*.yaml"), search_dirs=paths
          )
          config_files = set(reader_configs)
  
      for config_file in config_files:
          config_basename = os.path.basename(config_file)
          reader_name = os.path.splitext(config_basename)[0]
          paths = get_entry_points_config_dirs("satpy.readers")
          reader_configs = config_search_paths(
              os.path.join("readers", config_basename),
              search_dirs=paths,
              check_exists=True,
          )
  
          if not reader_configs:
              # either the reader they asked for does not exist
              # or satpy is improperly configured and can't find its own readers
              raise ValueError(
                  "No reader named: {}".format(reader_name)
              )
  
          yield reader_configs
  
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 9 for calling a global function with example usage: configs_for_reader(reader) without return types