code: def available_readers(as_dict=False, yaml_loader=UnsafeLoader):
      """Available readers based on current configuration.
  
      Args:
          as_dict (bool): Optionally return reader information as a dictionary.
                          Default: False.
          yaml_loader (Optional[Union[yaml.BaseLoader, yaml.FullLoader, yaml.UnsafeLoader]]):
              The yaml loader type. Default: ``yaml.UnsafeLoader``.
  
      Returns:
          Union[list[str], list[dict]]: List of available reader names. If `as_dict` is `True` then
          a list of dictionaries including additionally reader information is returned.
  
      """
      readers = []
      for reader_configs in configs_for_reader():
          try:
              reader_info = read_reader_config(
                  reader_configs, loader=yaml_loader
              )
          except (KeyError, IOError, yaml.YAMLError):
              LOG.debug(
                  "Could not import reader config from: %s",
                  reader_configs,
              )
              LOG.debug("Error loading YAML", exc_info=True)
              continue
          readers.append(
              reader_info if as_dict else reader_info["name"]
          )
      if as_dict:
          readers = sorted(
              readers, key=lambda reader_info: reader_info["name"]
          )
      else:
          readers = sorted(readers)
      return readers
  
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 11 for calling a global function with example usage: available_readers(as_dict, yaml_loader) and returns: readers