code: def test_available_datasets(filenames, expected_datasets):
      """Test that variables are dynamically discovered."""
      r = _create_fake_reader(filenames, {})
      avails = list(r.available_dataset_names)
      for var_name in expected_datasets:
          assert var_name in avails
  
imports: from __future__ import annotations
  import os
  from datetime import datetime
  from unittest import mock
  import numpy
  import pytest
  import xarray
  from satpy._config import config_search_paths
  from satpy.dataset import DataID
  from satpy.readers import load_reader
  from satpy.readers.yaml_reader import FileYAMLReader
label_desc: Use image node_id 5 for calling a global function with example usage: test_available_datasets(filenames, expected_datasets) without return types